[Expand]General Information
[Expand]WinForms Controls
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
 [Expand]Product Information
 [Expand]Get Started with DevExpress Reporting
 [Expand]Create Popular Reports
 [Expand]Detailed Guide to DevExpress Reporting
 [Expand]Visual Studio Report Designer
 [Collapse]Create End-User Reporting Applications
   Cross-Platform Reporting
  [Expand]WinForms Reporting
  [Collapse]WPF Reporting
   [Expand]Document Preview
   [Collapse]End-User Report Designer
    [Expand]Quick Start
    [Collapse]API and Customization
      Specify the Report Designer View
      Store Reports in the Report Designer
      Customize the Report Designer Toolbar
      Customize Context Menus in the Report Designer
      Add a Custom Control to the Report Designer Toolbox
      Hide and Customize Dock Panels in the Report Designer
      Register Custom Report Parameter Types
      Customize Report Designer Commands and Hot Keys
      Customize Smart Tags
      Hide Properties from the Report Designer
      Use Favorite Properties in the Report Designer
      Customize the Properties Window in the Report Designer
      Wizard Customization Overview
      Remove Data Providers from the Report Wizard
      Register a Custom Page in the Report Wizard
      Use the Query Builder Light Mode
   [Expand]Application Security
   [Expand]Application Appearance
    Application Deployment
    End-User Documentation
  [Expand]Web Reporting
  [Expand]WCF Report Service
  [Expand]Discontinued Platforms
   Redistribution and Deployment
 [Expand]API Reference
[Expand]Report and Dashboard Server
[Expand]eXpressApp Framework
[Expand]eXpress Persistent Objects
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation
View this topic on docs.devexpress.com (Learn more)

Store Reports in the Report Designer

This document describes how to implement a report storage to persist report definitions in a database or in any other custom location. This enables end-users to create and customize reports in the Report Designer and have a common target for saving and sharing all reports.

To accomplish the described functionality, do the following.

  1. Create a custom report storage object by implementing the IReportStorage interface.

  2. Override the following methods provided by the IReportStorage interface.

    • IReportStorage.CanCreateNew - Indicates whether or not it is possible to create a new tab with a blank report in the Report Designer.
    • IReportStorage.CreateNew - Creates a new report.
    • IReportStorage.CreateNewSubreport - Creates a new subreport (see XRSubreport).
    • IReportStorage.CanOpen - Indicates whether or not the Open command is available.
    • IReportStorage.Open - Opens a report selected by an end-user using a custom dialog.
    • IReportStorage.Load - Loads a report with the specified ID that has been selected using the Open method. You can use the IReportSerializer functionality to save or load a given report from a stream.
    • IReportStorage.GetErrorMessage - Displays an error message for any encountered exception.
    • IReportStorage.Save - Saves the currently edited report. The method's parameters are the following.

      • reportID specifies an unique ID of the edited report.
      • reportProvider allows you to access the actual report instance being edited and optionally rename it.
      • saveAs indicates which particular command has been executed (Save or Save As).
      • reportTitle specifies the actual report title.
      • designer specifies the actual report designer instance.
  3. After you have defined the custom report storage type, assign it to the ReportDesignerBase.ReportStorage property (for instance, in the Window's Loaded event handler).

Is this topic helpful?​​​​​​​