Add a New Report to an ASP.NET Core Application

This tutorial describes how to add a new report to an ASP.NET Core application in Visual Studio at design time.

Prerequisites

DevExpress Reporting has the following prerequisites in ASP.NET Core applications:

Create an ASP.NET Core Application

Do the following to create a new ASP.NET Core Web Application in Visual Studio:

  1. Create a new project (select File | New | Project in the main menu or press CTRL+SHIFT+N).

    create-new-project-vs2017

  2. Select the Installed | Visual C# | Web | ASP.NET Core Web Application project template in the invoked New Project dialog. Specify the application name and click OK.

    new-project-dialog-asp-net-core-application

  3. Select .Net Framework or .NET Core in the top-left drop-down box. Then select ASP.NET Core 2.1 in the version selector drop-down list. Choose Web Application (Model-View-Controller) and click OK to create the project.

    asp-net-core-application-settings

Add a Report to the ASP.NET Core Application

Do the following to add a report to your ASP.NET Core application:

  1. Create a new folder (named Reports) to store the application's reports. Switch to the Solution Explorer window (press CTRL+ALT+L), right-click the application item and select Add | New Folder.

  2. Right-click the created folder and choose Add | New Item... in the invoked menu.

    asp-net-core-add-new-xtrareport

  3. In the invoked Add New Item dialog, select the Installed | Visual C# | Reporting category and the DevExpress Report item template. Specify the report name and click Add.

    asp-net-core-devexpress-template-gallery-add-item-xtrareport

    This invokes the Report Wizard that helps you design a report.

    ReportDesigner

    The .repx, .cs and .Designer.cs files are added to the project when you finish the Report Wizard. Double-click the .repx file to invoke the Report Designer for the report.

    Note

    The report's REPX file is added as an embedded resource. Reports with another value of the Build Action property cannot be loaded at runtime.

 

Next Step: Create a Simple Data-Aware Report

See Also