ReportGalleryExtension Class
Enables you to implement a custom Report Gallery storage in WinForms and WPF applications.
Namespace: DevExpress.XtraReports.Extensions
Assembly: DevExpress.XtraReports.v24.2.dll
NuGet Package: DevExpress.Reporting.Core
Declaration
Related API Members
The following members return ReportGalleryExtension objects:
Remarks
The Report Gallery stores templates in the %localappdata%\Developer Express Inc\XtraReports Suite\ReportGallery.xml file.
You can use the abstract ReportGalleryExtension class to provide a custom Report Gallery storage, such as a database, cloud or any other location:
Create a descendant from this class.
Use the EnableSynchronization property to specify whether to share the storage and enable synchronization with local Report Gallery instances.
Implement the TryLoadGallery method to load the Report Gallery from the storage.
Implement one of the following methods:
- SaveGallery to save all the gallery items.
- SaveGalleryChanges to save only the changed gallery items.
(Optional) Override the ReportGalleryExtension.SaveGalleryState(GalleryState) and ReportGalleryExtension.TryLoadGalleryState(out GalleryState) methods to change logic related to the Gallery’s expanded and collapsed nodes.
To register the implemented storage, create its instance and pass it to the static ReportGalleryExtension.RegisterExtensionGlobal method.
using DevExpress.XtraReports.Extensions;
// ...
ReportGalleryExtension.RegisterExtensionGlobal(new MyGalleryStorage());
Tip
Online Example: WinForms and WPF Report Designers - How to implement a custom Report Gallery storage
You can also use the ReportGalleryDirectoryExtension class to store templates in the file system. This class is inherited from the ReportGalleryExtension class.
See the following topics for more information: