Showing posts with label xsd. Show all posts
Showing posts with label xsd. Show all posts

Monday, March 19, 2012

Crystal Report with XSD DataSource

Hi,
Can anyone tell me how do we use Crystal Reports with ASP with XML as DataSource. I have an XML and an XSD file which I want to use as DataSource. PLease tell me a URL where I can find any samples. Or if anyone do have any sample of using them, please let me know.Hi,

I am also using an XML-File as Data Source (in CR 10). It is included via the CR-Designer as ADO.NET (XML) Datasource, as we didn't want to create DSN-Entries on every Client-Machine. We change the Path to the XML-File during runtime:

dtsData.ReadXml(pstrReportXml);

foreach (CrystalDecisions.CrystalReports.Engine.Table tbl in cr.Database.Tables)
{
if (tbl.Name[0]=='YourCrTable')
{
tbl.SetDataSource(dtsData);
}
}

Hope this helps.

A Problem we have: CR does not seem to interpret the XSD-File. It is linked in the XML-File via

<dataroot xmlns:od="urn:schemas-microsoft-com:officedata"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="001.xsd">
------------------

Does anyone know a workaround?