DevExpress-Examples / reporting-provide-custom-report-gallery-storage-in-report-designer

Store Report Gallery templates in a database and share them between multiple users

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

WinForms and WPF Report Designers - How to Implement a Custom Report Gallery Storage

This example demonstrates how to store Report Gallery templates in a database and share them between multiple users.

Example Overview

Steps to implement a custom storage:

  1. Create a descendant of the abstract ReportGalleryExtension class.
  2. Set the ReportGalleryExtension.EnableSynchronization property to true to enable synchronization between a shared database storage and local Report Gallery instances. This also adds the Refresh button to Report Gallery toolbars. End users can click this button to update Gallery content explicitly.
  3. Implement the TryLoadGallery method to load the entire Report Gallery from the database storage.
  4. Implement the SaveGallery or SaveGalleryChanges method to save the entire Gallery or only the changes that have been made.

This example demonstrates how to implement the following storages:

  • XpoReportGalleryStorageSimple - saves and loads all the gallery items.

    In this storage, the SaveGallery is implemented to overwrite the entire Report Gallery. The TryLoadGallery method is called when the Gallery runs and whenever a user manages gallery items.

  • XpoReportGalleryStorageAdvanced - saves and loads the changed items only.

    In this storage, the SaveGalleryChanges method is implemented to save Report Gallery changes. The protected GetChanges method is overridden to compare changed items only. This method is called whenever a user manages gallery items. The TryLoadGallery method is called only when the Gallery runs.

Do the following to register the Report Gallery storage in your application:

Files to Review

Doumentation

Does this example address your development requirements/objectives?

(you will be redirected to DevExpress.com to submit your response)

About

Store Report Gallery templates in a database and share them between multiple users

License:Other


Languages

Language:Visual Basic .NET 53.3%Language:C# 46.7%