Loading Data from an XSD File
XSD files are XML Schema Documents. Reports for WinForms is compatible with XSD files, allowing you to load report data from an XSD file. To load the report data, you can set the ConnectionString property to the name of an XSD file. XSD files contain XML representations of ADO.NET DataSet objects. So in this case, you would set the RecordSource property to the name of a table in the DataSet.
Note: to create an XSD file, take an existing DataSet object and call the WriteXml method using the XmlWriteMode.WriteSchema parameter.
Loading an XSD file in the C1ReportDesigner application is quite simple using the C1Report Wizard. Complete the following steps to open an XSD file:
1. Open the C1Report Wizard by completing one of the following:
• From the C1ReportDesigner application, click the New Report button from the Reports tab
• In Visual Studio by select Edit Report from the C1Report context menu
• In Visual Studio by select Edit Report from the C1Report Tasks menu
This will open the C1Report Wizard. You can select an XSD file in the first screen of the C1ReportWizard. For more information accessing the Edit Report link, see C1Report Tasks Menu or C1Report Context Menu.
2. In the C1Report Wizard, click the Select XSD file button next to the Connection String text box. The Select XSD file button appears as an open folder icon:
This button will open the Select XML Schema Definition File dialog box.
3. Navigate to an XSD file, select it, and click the Open button to open the XSD file.
The selected file will open in the C1ReportDesigner application. You can edit and format the file. See Working with C1ReportDesigner for details.
|