The Report Gallery stores templates in the %localappdata%\Developer Express Inc\XtraReports Suite\ReportGallery.xml file. This document describes how to implement a custom Report Gallery storage.
Do the following to store the Report Gallery's templates in another file:
The code below demonstrates how to store templates in the directory that contains 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));
Online Example: How to implement a custom Report Gallery storage
Do the following to store templates in any location (database, cloud, XPO object, etc.) and share them between multiple users:
Create a descendant from the abstract ReportGalleryExtension class.
Set the EnableSynchronization property to true to synchronize items in local Report Gallery instances with items from a shared storage.
Implement the TryLoadGallery method to load the Report Gallery from the storage.
Implement one of the following methods:
Create a storage instance and pass it to the static ReportGalleryExtension.RegisterExtensionGlobal method.
If you enable gallery synchronization, the Refresh button becomes available in the Report Gallery toolbar. Click this button to explicitly synchronize gallery items with the storage.
The following dialog appears when you try to move or rename an item that another user removed:
Click OK to restore this item and add it to the Restored folder.