Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

Visual Studio Report Designer

  • 5 minutes to read

The Visual Studio Report Designer allows you to create platform-independent reports, preview them, and export to PDF, XLSX, and other formats.

Visual Studio Report Designer

The Report Designer is supported for .NET/.NET Core or .NET Framework projects. Refer to the following topic for more information: .NET Support in Reporting.

#Install the Report Designer

Use the DevExpress Unified Component Installer to install DevExpress components. These components include the Report Designer.

Download: Free 30-Day Trial - Unified Component Installer

#Invoke the Report Designer

The Report Designer is supported for Visual Studio projects of the following types:

  • Class Library
  • Console Application
  • WinForms
  • WPF
  • ASP.NET Web Forms
  • ASP.NET MVC
  • ASP.NET Core
  • Blazor Server
  • WinUI

To invoke the designer, create a project of a supported type and add a new report to this project as described in the following steps:

  1. Press CTRL+SHIFT+A or click Project | Add New Item in the Visual Studio menu.

    Add a new item

  2. Select the DevExpress Report item, specify a report name, and click Add.

    Select the DevExpress Report item

  3. Select the report type in the invoked Report Wizard and click Finish.

    Select Blank in the Report Wizard

    Note

    In .NET/.NET Core projects, a template for inherited reports is not supported in the Report Wizard. In such projects, you can inherit from a report only in code.

#Use Report Designer Elements

After you invoke the Report Designer, the following elements appear in Visual Studio:

#The Designer, Preview, and Scripts Tabs

The Designer tab includes the design surface that consists of bands. You can drop report controls onto these bands to design a report layout.

Designer tab

The Preview tab allows you to generate and preview a report document.

Preview tab

In this tab, you can also do the following:

In the Scripts tab, you can write code to do custom calculations over report data.

Scripts tab

Refer to the following topic for more information: Scripts Overview.

#The XtraReports Menu

The XtraReports menu

Use the XtraReport menu to do the following:

  • Enable/disable dock panels.
  • Invoke the Report Designer Options window (Designer Options).
  • Open the DevExpress Reporting online documentation (Learn More Online).
  • Get information about your DevExpress subscription (About).

#Dock Panels

  • Field List – displays data fields available in the report’s data sources. You can drop each field onto the design surface to create a control bound to this field. You can also use the Field List to create, modify, or delete report parameters.

    Field List

  • Report Explorer – displays a report structure in a tree-like form. Allows you to access report elements, rearrange them, change their settings, and add them to the Report Gallery as templates. You can also use the Report Explorer to add, modify, or delete report styles and report data sources.

    Report Explorer

  • Report Gallery – allows you to store and reuse reports and their elements.

    Report Gallery

  • Group and Sort Panel – enables you to manage a report’s group and sort settings. This panel is active only when a report is bound to a data source.

    Group and Sort panel

  • Error List – shows errors, warnings, and information messages that describe the issues in your application.

    Error List

#Specify Report Settings

Use the Report Designer Options window to specify report design-time settings.

report-designer-options-dialog

#Localize a Report

The Report Designer includes the Localization Editor that allows you to localize a report.

Localization Editor

Refer to the following topic for more details: Localization Editor (Visual Studio IDE).

#Save a Report

You can save a report and import it to another project, or open the report in the End-User Report Designer.

Click a report’s smart tag and click Save.

Save a report

In the invoked Save as dialog, specify a file name and type.

Specify a file name and type

The saved report is stored in a *.repx file. You can save a report in XML (Report XML Files) or CodeDOM (Report Files) format. We recommend that you always store and distribute your reports in XML format. Refer to the following topic for more information: Store Report Layouts and Documents.

#Import a Report

Click the report’s smart tag and select the Open/Import action.

Import a report

Select a *.repx file in the invoked Import Report dialog.

Select a .repx file

In Visual Studio, you can also import reports produced by third-party vendors. Refer to the following topic for more information: Convert Third-Party Reports to DevExpress Reports.

#Work with a Report in Code

The Report Designer serializes your report while you create it in Visual Studio. This serialization mechanism allows you to create an instance of your report in code. You can then modify, export, or print the created report without showing its preview, or pass the report instance to the Document Viewer or the End-User Report Designer.

The following example creates a report instance and exports it to PDF:

using System;
//..

var report = new XtraReport1();
report.ExportToPdf(Environment.GetFolderPath(
    Environment.SpecialFolder.UserProfile) + @"\Downloads\Report1.pdf"
);

Refer to the following articles for more information:

#Get Help on DevExpress Reporting API

You can open online documentation on a report control or its property from Visual Studio. Select a control in the Report Designer or click a property in the Properties window and press F1.

reporting-get-help-from-report-designer

Refer to the following topic for more information: Get Help on DevExpress Reporting API.

#Troubleshooting

If you have an error code or unexpected behavior while using the Visual Studio Report Designer, refer to the following guide for explanations: Troubleshooting.