Add a New Report to an ASP.NET Core Application
- 2 min to read
This tutorial describes how to add a new report to an ASP.NET Core application in Visual Studio at design time.
DevExpress Reporting has the following prerequisites in ASP.NET Core applications:
- Install .Net Core 2.1 SDK or later.
Install Visual Studio 2017 v15.7 or later with the following workloads:
- ASP.NET and web development
- .NET Core cross-platform development
Create an ASP.NET Core Application
Do the following to create a new ASP.NET Core Web Application in Visual Studio:
Create a new project (select File | New | Project in the main menu or press CTRL+SHIFT+N).
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.
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.
Add a Report to the ASP.NET Core Application
Do the following to add a report to your ASP.NET Core application:
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.
Right-click the created folder and choose Add | New Item... in the invoked menu.
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.
This invokes the Report Wizard that helps you design a report.
The .repx file is added to the project when you finish the Report Wizard. Double-click it to invoke the Report Designer. This also adds the .cs and .Designer.cs files to the project so you can add custom logic to your report, such as event handlers.
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