Back to Devexpress

ReportGalleryExtension Class

xtrareports-devexpress-dot-xtrareports-dot-extensions-1eecd29c.md

latest4.3 KB
Original Source

ReportGalleryExtension Class

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

Namespace : DevExpress.XtraReports.Extensions

Assembly : DevExpress.XtraReports.v25.2.dll

NuGet Package : DevExpress.Reporting.Core

Declaration

csharp
public abstract class ReportGalleryExtension
vb
Public MustInherit 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.

  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.

csharp
using DevExpress.XtraReports.Extensions;

// ...
ReportGalleryExtension.RegisterExtensionGlobal(new MyGalleryStorage());
vb
Imports 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:

Inheritance

Object ReportGalleryExtension ReportGalleryDirectoryExtension

See Also

ReportGalleryExtension Members

ReportGalleryDirectoryExtension

Report Gallery

DevExpress.XtraReports.Extensions Namespace