Skip to main content
A newer version of this page is available. .

Create a Custom End-User Report Designer

  • 3 minutes to read

Note

You need a WinForms subscription to use the API described in this tutorial.

The Invoke a Default End-User Report Designer Form tutorial illustrates how to open the Report Designer with the Reporting subscription.

This tutorial demonstrates how to add an End-User Report Designer to WinForms applications

Create a Ribbon Report Designer

Switch to the application’s main form in Visual Studio and press CTRL+ALT+X to open the Toolbox. Drop the RibbonReportDesigner component onto the form to create a custom End-User Report Designer with a ribbon UI.

If required, you can hold down the ALT key while dropping this component to add the End-User Report Designer with the previous ribbon version.

drop-ribbon-report-designer

Use the XRDesignMdiController.OpenReport method to open a report in the End-User Report Designer.

private void Form1_Load(object sender, System.EventArgs e) {
    XtraReport1 report = new XtraReport1();
    reportDesigner1.OpenReport(report);
}

Tip

See Adding a New Report to a WinForms Application to learn how to add a new XtraReport at design time in the Visual Studio.

Create a Standard Report Designer

Switch to the application’s main form in Visual Studio and press CTRL+ALT+X to open the Toolbox. Drop the StandardReportDesigner component onto the form to create a custom End-User Report Designer with a standard UI.

drop-standard-report-designer

Use the XRDesignMdiController.OpenReport method to open a report in the End-User Report Designer.

private void Form1_Load(object sender, System.EventArgs e) {
    XtraReport1 report = new XtraReport1();
    reportDesigner1.OpenReport(report);
}

Visually Inherit from a Designer Form

Another way to create an End-User Report Designer form is to visually inherit it from the XRDesignForm class.

Note

This approach imposes limitations on using the Visual Studio design time - you cannot customize the XRDesignBarManager at design time.

Do the following to create an inherited End-User Report Designer form:

  1. Select PROJECT | Add New Item… in the Visual Studio’s main menu and select Inherited Form in the dialog that is invoked.

    end-user-designer-inherit-design-form

  2. Click Browse in the invoked Inheritance Picker dialog, and locate the DevExpress.XtraReports.v18.2.Extensions.dll file (it is stored in the “C:\Program Files (x86)\DevExpress 18.2\Components\Bin\Framework” folder by default).

    Select the XRDesignForm or XRDesignRibbonForm class as the base for the created form and click OK.

    end-user-designer-inheritance-picker

This adds a custom Report Designer form to your application:

You can now customize the Report Designer form by adding custom code to the created subclass:

using DevExpress.XtraReports.UserDesigner;
// ...

namespace WindowsFormsApplication1 {
    public partial class CustomForm : XRDesignForm {
        public CustomForm() {
            InitializeComponent();
        }
            // ...
    }
}
See Also