The following example demonstrates how to implement a report storage to persist report definitions in a database or in any other custom location. This may be useful when providing end-users with the capability to create and customize reports using XtraReports End-User Designer if it is necessary to have a common target for saving and sharing all reports. At present, the aforementioned functionality is accomplished through the DevExpress.Xpf.Reports.UserDesigner.IReportFileStorage interface. The interface provides the following methods:
- ShowSaveAsDialog
- ShowOpenDialog
- Load
- Save
- GetErrorMessage
As we see, the interface methods are quite straightforward: the first two methods are intended to show a dialog to an end-user when selecting a report among the predefined reports, or otherwise, save it; when he does that, the Save or Load methods are invoked when the unique name of the selected report is invoked. That's where you should implement your custom save logic. If you're unfamiliar with this procedure, please refer to the original E2704 example, which provides additional information in this regard (the example illustrates the same technique but for WinForms EUD)
NOTE:
The WPF Report EUD is still in the beta stage (v.15.1); thus, there can be some limitations which are impossible to overcome at this moment (for example, there is no way to fill the SubReport's ReportSource drop-down window with the list of available reports). Moreover, some detail implementation may be changed on its official release. If you're experiencing any issues with running this sample or have additional questions, please contact our Support Team directly for further assistance.
- ShowSaveAsDialog
- ShowOpenDialog
- Load
- Save
- GetErrorMessage
As we see, the interface methods are quite straightforward: the first two methods are intended to show a dialog to an end-user when selecting a report among the predefined reports, or otherwise, save it; when he does that, the Save or Load methods are invoked when the unique name of the selected report is invoked. That's where you should implement your custom save logic. If you're unfamiliar with this procedure, please refer to the original E2704 example, which provides additional information in this regard (the example illustrates the same technique but for WinForms EUD)
NOTE:
The WPF Report EUD is still in the beta stage (v.15.1); thus, there can be some limitations which are impossible to overcome at this moment (for example, there is no way to fill the SubReport's ReportSource drop-down window with the list of available reports). Moreover, some detail implementation may be changed on its official release. If you're experiencing any issues with running this sample or have additional questions, please contact our Support Team directly for further assistance.