Skip to Content

Export report in .NET with data in XML file

Oct 12, 2016 at 11:02 AM


avatar image
Former Member


I have a report with the data in a XML file. In the report definition, the link with XML file is relative path, only "myxmlfile.xml" and "myxsdfile.xsd". In my code, I want load this report and exported to the disk in PDF file or to printer.

If I don't launch the preview the report before in the Crystal Designer, my code don't work and I have a error "CrystalDecisions.CrystalReports.Engine.LogOnException : Echec de connexion à la base de données" : failed to connect to the database.

Have you got any solution , please ?

This is my code :

ReportDocument rptXml = new ReportDocument();
rptXml.ExportToDisk(ExportFormatType.PortableDocFormat, "res.pdf");
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
Don Williams
Oct 12, 2016 at 02:11 PM

Post to:

SAP Crystal Reports, version for Visual Studio

10 |10000 characters needed characters left characters exceeded