ReportGalleryExtension Class

Enables you to implement a custom Report Gallery storage in WinForms and WPF applications.

Namespace: DevExpress.XtraReports.Extensions

Assembly: DevExpress.XtraReports.v19.2.dll

Declaration

public abstract class ReportGalleryExtension
Public MustInherit Class ReportGalleryExtension

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

Object
ReportGalleryExtension
See Also