Skip to main content

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

public abstract class ReportGalleryExtension

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:

  1. Create a descendant from this class.

    using DevExpress.XtraReports.Extensions;
    //... 
    
    public class MyGalleryStorage : ReportGalleryExtension {
         // ...
    }
    
  2. Use the EnableSynchronization property to specify whether to share the storage and enable synchronization with local Report Gallery instances.

  3. Implement the TryLoadGallery method to load the Report Gallery from the storage.

  4. Implement one of the following methods:

  5. (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());

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:

Inheritance

See Also