This example demonstrates how to implement a report storage to store and retrieve report layouts. The project contains code for the following custom storages:
- DataSetReportStorage — stores reports in an XML file.
- XpoReportStorage — stores reports in an XPCollection.
- ZipReportStorage — stores reports in a zip archive.
Uncomment the appropriate code in the Program.cs (VB: Program.vb) file to select a storage type.
A storage is a class that inherits the ReportStorageExtension class and implements methods to store and retrieve reports serialized in XML format.
Note that the default report serialization mechanism does not support data sources and user-defined types, such as data objects, data sets, XPO data sources, and custom report parameters. You should implement custom XML serialization logic to store these objects along with the reports. Review the following examples:
- How to implement custom XML serialization of a report that is bound to a dataset
- How to serialize the XPO data source
- How to serialize parameters of custom types
When you run the project, a window appears that allows you to select a report, and open the End-User Designer to edit the report, or open the report preview.
If you click Design, the End-User Report Designer is invoked. It allows you to open, edit and save the report. End-User Report Designer displays the following warning on an attempt to load a report:
For more information, review the following help topic: Ensure Safe Loading of Reports (WinForms).
The following image shows the invoked End-User Report Designer with Ribbon UI:
When you click Open or Save in the Report Designer, the Storage Editor window appears. It allows you to select a report or specify a new report name.
- DataSetReportStorage.cs (VB: DataSetReportStorage.vb)
- Form1.cs (VB: Form1.vb)
- Program.cs (VB: Program.vb)
- StorageDataSet.cs (VB: StorageDataSet.vb)
- StorageEditorForm.cs (VB: StorageEditorForm.vb)
- XpoReportStorage.cs (VB: XpoReportStorage.vb)
- ZipReportStorage.cs (VB: ZipReportStorage.vb)
- Custom Report Storage
- End-User Report Designer for WinForms
- End-User Documentation
- WinForms Reporting Application Security
- WPF End-User Report Designer - How to Implement a Report Storage
- How to integrate the Web Report Designer into an MVC web application
(you will be redirected to DevExpress.com to submit your response)