Skip to Content
Former Member
Sep 19, 2008 at 02:35 PM

Dynamic XML as Datasource - View in .NET CrystalReportViewer


I have Crystal Reports XI R2 Developer Edition, Visual Studio 2008. I have an XML File that has sections structured in a relational way within the file. From this file, I've built a basic schema.

First problem: Building the proper RPT file. I think using the ADO.NET (XML) connection is the best way to go here, how do I get the RPT file to recognize the schema..? Here are the options in my head:

1. Select ADO.NET(XML) connection and when it asks for file, point it to the XSD file. This loads the fields in the field explorer, with the correct datatypes. But how then do I run a preview?

2. Link the schema file inside the XML file (and every XML file that will be called dynamically). Then Select ADO.NET (XML) and point it to the XML file, I can preview, but how do I switch XML files later (see problem 2).

Second Problem: Launching CrystalReportViewer with dynamic XML datasource. What needs to be done here.. ? Do I need a Dataset in my visual studio project? Can I just use the XML / XSD / RPT combination? How to I flip the RPT to use different XML files..?

There are zero examples of this it seems. Anything will help me. Thanks.