ReportGalleryExtension Class
Provides the functionality required to implement a custom storage for the Report Gallery.
Namespace: DevExpress.XtraReports.Extensions
Assembly: DevExpress.XtraReports.v18.2.dll
Declaration
Remarks
Create a descendant from the abstract ReportGalleryExtension class, to provide a custom storage for the Report Gallery (such as a desired file on a hard drive, database, cloud or any other location). All storing and loading logic is managed at the level of the ReportGalleryExtension.SaveGallery and ReportGalleryExtension.TryLoadGallery methods.
To register the implemented storage, create its instance and pass it to the static ReportGalleryExtension.RegisterExtensionGlobal method.
The ReportGalleryDirectoryExtension class is inherited from the ReportGalleryExtension class and is intended to manage persisting Report Gallery templates in a file system. By default, these templates are stored in the %localappdata%\Developer Express Inc\XtraReports Suite\ReportGallery.xml file.
The following code snippet demonstrates how to store the Report Gallery file in the directory with the application’s executable file.
using System.IO;
using DevExpress.XtraReports.Extensions;
// ...
string path = Path.Combine(Path.GetDirectoryName(Application.ExecutablePath), "ReportGallery.xml");
ReportGalleryExtension.RegisterExtensionGlobal(new ReportGalleryDirectoryExtension(path));
For information on using the Report Gallery, refer to the Report Gallery document.