Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Technical Questions
Message Icon Topic: xml local data source +xsd / C# Post Reply Post New Topic
Author Message
chrbruno
Newbie
Newbie


Joined: 16 Oct 2012
Online Status: Offline
Posts: 1
Quote chrbruno Replybullet Topic: xml local data source +xsd / C#
    Posted: 16 Oct 2012 at 9:55pm
Hello,

i have created a report based on an xml data file and an xsd schema, using an connection based on "XML and Web Service" with a local data source.

I have not found a way to provide different data than the XML file, using a program written in C# (it fails even when I provide the same data, using dataset)

the code is :

DataSet ds = new DataSet();
ds.ReadXml("the_same_xml_file");
CrystalReportSource1.Report.FileName = "reports/report1.rpt";
CrystalReportSource1.ReportDocument.SetDataSource(ds);

No exception is generated, but the ASP.NET page that contains the report viewer displays a gray box with message "error loading database informations, error in file report1 {C24095F4-5F0B-44E5-9E3A-54562AE7ADC4}.rpt" (translated from french)

please, could you tell me what to check, or point me to sample code ?

Thanks in advance for your help

Regards
Christian
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 18 Oct 2012 at 4:53am
never used the "xml and web service" datasource. I have used the ADO.Net datasource and the xml file fine for years...
that might be worth a try.
 
they only other thing that comes to mind is that perhaps the relative path is incorrect, but if the report is displaying correctly (except for the gray box...) then that is probably not it.
 
our app passes the report and sets the data in a common object, so I am using different code...also our reports are embedded in the app (well a related dll really but minor difference)
 
hope some of this is useful and guides you to a solution.
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.018 seconds.