Skip to Content
avatar image
Former Member

Export report in .NET with data in XML file

Hello,

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.Load("myrptfile.rpt");
rptXml.ExportToDisk(ExportFormatType.PortableDocFormat, "res.pdf");
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Oct 12, 2016 at 02:11 PM

    Post to:

    SAP Crystal Reports, version for Visual Studio

    Add comment
    10|10000 characters needed characters exceeded