Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]General Information
[Expand]WinForms Controls
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Document Server
[Collapse]Reporting
 [Expand]Product Information
 [Expand]Getting Started
 [Expand]Fundamental Concepts
 [Collapse]Concepts
  [Expand]Report Types
  [Expand]Report Controls
  [Expand]Platform-Specific Reporting
  [Expand]Creating Reports
  [Expand]Storing Reports
  [Expand]Publishing Reports
  [Collapse]End-User Reporting
   [Collapse]Windows Forms
    [Expand]End-User Report Designer
     Report Gallery
   [Expand]WPF
   [Expand]ASP.NET
  [Expand]Application Appearance
  [Expand]Migration to XtraReports
 [Expand]Design-Time Features
 [Expand]Examples
  End-User Capabilities
 [Expand]Localization
 [Expand]Redistribution and Deployment
 [Expand]API Reference
[Expand]Report Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Report Gallery

This topic explains how you can implement a custom gallery, where you can store all your report templates, allowing your end-users to load them into an End-User Designer. To learn about using the DevExpress report gallery at design time within Visual Studio, see Report Gallery.

This topic consists of the following sections.

Expanded Prepare Your Report Templates

To prepare custom templates, you can open your reporting application in Visual Studio, and then either save your reports to REPX, or compile the application into a DLL that you will then be able to edit using the Report Template Editor.

The ReportTemplateEditor tool is provided with the XtraReports installation. It is available in the following directory: "C:\Program Files (x86)\DevExpress 17.1\Components\Tools\XtraReportsDesign".

This tool allows you to load a REPX file (that uses CodeDOM serialization), a custom XML report definition file, or a DLL (that may contain multiple XtraReport instances) and generate a preview/icon picture over them.

The tool creates a preview image and icon for every report and allows you to save your templates to ZIP files that are ready to be added to your gallery. If required, you can also open an existing ZIP file that contains report templates, to preview and modify its templates.

For more information on using this editor, see How To: Use the Report Template Editor.

Expanded Provide a Custom Report Gallery

To provide a custom report gallery to an End-User Designer for Windows Forms, add a reference to the DevExpress.XtraReports.v17.1.Extensions assembly in your project and write the following code into the project's app.config file.

In this code, the path attribute of the directory section specifies a folder where ZIP files containing your report templates are stored.

A sample application illustrating this feature is available online, at How to deploy a custom report template gallery for an End-User Designer.

Another sample implementation of a custom report gallery is illustrated in the End-User Report Designer demo in the Windows Forms demos shipped with the XtraReports Suite installation.

In this demo, when you click a report's smart tag, you can see the Load Report Template... link that launches the Report Templates dialog.

In this dialog, pick a template and click Load, to apply it to the current report.

Expanded Use the Bindings Updater

After you have downloaded a template, bind your report to a data source and update the report controls' bindings appropriately.

To do this, click the report's smart tag, and in its actions list, click the Edit Bindings... link.

In the invoked Edit Bindings dialog, you can view the bindings that are currently assigned to every report control (in the Control, Property Name and Source Bindings columns).

To exclude properly bound controls from this list, enable the Show only invalid bindings option.

To update a control's data bindings, enable the corresponding check box in the first column and assign the required bindings from the report's data source (in the Destination Bindings column).

After you have finished updating the bindings, click OK to close the dialog and apply the changes.

Expanded See Also

How would you rate this topic?​​​​​​​