on 05-23-2016 10:56 PM
Hi,
I have a service which generates report output in requested format. All reports use ADO.NET (XML) as their data source during design and run-time.
The code is very simple. I just set location of XML:
// load report template
crReportDocument = new ReportDocument();
crReportDocument.Load(templateFilePath, OpenReportMethod.OpenReportByTempCopy);
if (crReportDocument.Database.Tables.Count > 1)
{
throw new Exception("Invalid report template. Report " + templateName + " contains " +
crReportDocument.Database.Tables.Count + " tables.");
}
// Point a report to XML file
crReportDocument.Database.Tables[0].Location = xmlFilePath;
foreach (ReportDocument crSubReport in crReportDocument.Subreports)
{
crSubReport.Database.Tables[0].Location = xmlFilePath;
}
//Export the report
crReportDocument.ExportToStream(exportFormat).CopyTo(ms);
The service works fine on my workstation and on DEV server. But on QA server I keep on getting the following error for all reports:
Logon failed.
Error in File aacmpb_edk521mz.dii 4428_1268_{16C82480-29EB-4089-9927-1A15668F592B}.rpt:
Unable to connect: incorrect log on parameters.
at CrystalDecisions.ReportAppServer.Controllers.DatabaseControllerClass.SetTableLocation(ISCRTable CurTable, ISCRTable NewTable)
at CrystalDecisions.CrystalReports.Engine.Table.set_Location(String value)
at myCFO.Services.CRGService.GenerateOutput(String templateName, Byte[] xmlData, ExportFormatType exportFormat)
XML file exist.
I verified XML files against template in Crystal Reports designer. No issues.
I'm lost. I cannot figure out why the same code works on one server and does not on another.
I use CRforVS_redist_install_64bit_13_0_16.
Please HELP!!!
Sincerely,
Dmitri
Your App.config file is likely missing on that PC.
You also need this in it:
<startup useLegacyV2RuntimeActivationPolicy="true">
And check permissions, make sure the output folder has full read/write permission for IIS to access the folder.
Don
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.