The following small application is designed to allow testing created
reports with XML feeds used as data sources. The program checks that fields in
report match to the fields in XML and then shows the report with loaded data in
the report viewer.
How to Use?
1. Fill the following fields "Path to Report" and "Path
to XML file": The "Path to Report textbox" serves for entering the path to a
report. (Ex: CROrdersManifest.rpt).
The "Path to XML file" allows entering the path to the XML feed. (ex:
Both files are stored in the root of the application.
Note: Browse buttons open a standard
File Open dialog.
2. Click Preview Report
Note: The program checks that specified report and XML match to
each other- i.e. they contain the same fields. If the program finds
inconsistence it reports about it as it is shown below:
In order to get XML file use WriteXml method of dataset class. Like the
Having created XML file you can allow designers to create reports without
permanent access to your database.
oRpt As New
'try to load the specified
'try to load data for the
missingInSource, missingInReport As String
'checks that fields
in XML file match to the fields specified in the report file
fieldsMissing As Boolean =
Not CheckMissingFields(oRpt, dtsData, missingInSource, missingInReport)
'informs about the result
If Not fieldsMissing
cRVOrder.ReportSource = oRpt