Quantcast
Channel: SCN : All Content - SAP Crystal Reports
Viewing all articles
Browse latest Browse all 4716

Xml and Web Services Datasources from c#

$
0
0

Hi,

 

I had a set of reports created with Crystal Reports 2011; each one is using a 'Xml and Web Service' datasource that is binded to a local XML file.  They are working well when you do a preview from Crystal Reports application.

 

The problem is when I try to export these reports from a C# application to a PDF file. Each time I try it I get this error:

 

     No es posible cargar la información de la base de datos.

     Error en el archivo stage {90F39511-918D-469A-A865-148769735C22}.rpt:

     No se pudo cargar la información de la base de datos.

 

In english is something like this:

 

     It's not possible to load the information from the database.

     Error on file stage {90F39511-918D-469A-A865-148769735C22}.rpt:

     Information from database could not be loaded.

 

The code I'm using is something like that:

 

     ReportDocument rpt = new ReportDocument();

     rpt.Load@"c:\myreport.rpt");

     rpt.ExportToDisk(ExportFormatType.PortableDocFormat, @"c:\test.pdf");

 

I have been using this kind of code without problems with reports with ADO.NET datasources but I can make it work with this 'Xml and Web Service' datasources, any ideas?

 

Thanks for you help.


Viewing all articles
Browse latest Browse all 4716

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>