Hello,
I am using some Crystal Reports in my web application and exporting them as PDF file. The files are developed in Crystal Reports 13_0_2 for Visual Studio 2010. After deploying on server, all reports are working fine expect one.
At the time of export, it is giving following error message:
Logon failed.Failed to export the report.
Error in File testing {F282207C-64DC-43E3-8EB8-562E7FB9643E}.rpt:
Unable to connect: incorrect log on parameters.
For reports I am using XML file as datasource and passing connection through following code.
PropertyBag logonInfo = new PropertyBag();
logonInfo.EnsureCapacity(1);
logonInfo.Add("XML File Path", Server.MapPath("sample.xml"));
PropertyBag attributes = new PropertyBag();
attributes.EnsureCapacity(5);
attributes.Add("Database DLL", "crdb_adoplus.dll");
attributes.Add("QE_DatabaseType", "ADO.NET (XML)");
attributes.Add("QE_ServerDescription", "NewDataSet");
attributes.Add("QE_SQLDB", true);
attributes.Add("QE_LogonProperties", logonInfo);
CrystalDecisions.ReportAppServer.DataDefModel.ConnectionInfo connectionInfo = new CrystalDecisions.ReportAppServer.DataDefModel.ConnectionInfo();
connectionInfo.Kind = CrConnectionInfoKindEnum.crConnectionInfoKindCRQE;
connectionInfo.Attributes = attributes;
I don't get the issue, all reports are same and other reports are working fine, I am able to download them as PDF file except one report. What should I do, any idea?
Regards,
Namrata