cancel
Showing results for 
Search instead for 
Did you mean: 

Xml and Web Services Datasources from c#

Former Member
0 Kudos

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.

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Hi Marc,

moved your post to .NET SDK forum

Possibly a permission issue to that folder?

What happens if you export to RPT format or any other format?

Can you view the report and then use the Viewers Export button?

Don

Former Member
0 Kudos

Hi Don,

I tried to move the XSD, XML and RPT file to another folder but when I try to export it from my C# application I get the same error. I also tried to export to different formats with the same results.

Finally, I tried to preview the report with a 'CrystalReportViewer' object but when I call the 'RefreshReport' I got the same error once again.

Any Ideas?

Thanks for your help Don!

0 Kudos

Hi Marc,

I still think it's permissions. Take CR out of the pricture, write a new app that simply loads/reads the data into a Dataset. while its eading use somethign like Fiddler to see waht is going on.

I believe it's your WEB server doesnt' have permissions to get to the folder and /or read the data.

Don


Answers (0)