CrystalReportsIntegration
--------------------------------
Shows how to create a report using C1DataObjects data with Crystal Reports. Other reporting tools can be used in a similar fashion.

After creating a C1DataSet component and attaching it to a C1SchemaDef with schema,
select "Save XML Schema" from the C1DataSet context menu and save the data set schema in a file
(the file is saved in the sample project directory is DataSetSchema.xml, but you
can use any file name you want). This is a schema of an ADO.NET data set containing a table
for each table view in the C1DataObjects data set definition.

Creating a report at design time (CrystalReport1.rpt) in the Report Expert or in the
Database Expert, select More Data Sources | ADO.NET (XML) and enter the path to the saved
schema file in the ADO.NET (XML) dialog. Then you will be able to view and edit links
(default links are based on view relationships from the C1DataObjects data set),
select fields and build the report.

To set the report data source at run time and attach the report to the viewer,
the following code is used:

<code>
    CrystalReport1 report = new CrystalReport1();
    report.SetDataSource(c1DataSet1.GetExportDataSet());
    crystalReportViewer1.ReportSource = report;
</code>

The C1DataSet.GetExportDataSet methods returns an ADO.NET DataSet containing 
a table for each table view in the C1DataObjects data set definition
(and a relation for each view relation). This ADO.NET data set is used here as the
run-time data source for the report.




