expressappframework-404206-getting-started-in-depth-tutorial-blazor-enable-additional-modules-create-a-report-in-visual-studio.md
This lesson explains how to create reports in the integrated reporting system. This system is based on the DevExpress Reporting library.
The instructions below show how to do the following:
Add the DevExpress.ExpressApp.ReportsV2 NuGet package to the MySolution.Module project. See the following topic for more information on how to install DevExpress NuGet packages: Choose Between Offline and Online DevExpress NuGet Feeds.
Add the DevExpress.ExpressApp.ReportsV2.Blazor NuGet package to the MySolution.Blazor.Server project and the DevExpress.ExpressApp.ReportsV2.Win NuGet package to the MySolution.Win project.
Go to the MySolution.Module\MySolutionDbContext file and add a DbSet of ReportDataV2 type:
In the MySolution.Blazor.Server project, open the Startup.cs file and add the Reports V2 module to the application builder. Do the same in the Startup.cs file in the MySolution.Win folder.
Run the application. In the navigation control, expand the Reports group and select the Reports item to invoke the Report List View.
In ASP.NET Core Blazor or Windows Forms runtime, the steps to create a report are the same. This lesson demonstrates these steps in the ASP.NET Core Blazor application.
In the Report List View, click the New button to invoke the New Report Wizard Parameters pop-up window.
Specify Employee List as the name of the report in the application UI and select Employee in the Data Type drop-down list. Click Create. XAF uses data of this type to generate the report.
In the Report Wizard , select Table Report and click Next.
Select the FirstName , LastName , and Email data fields and click Next.
Select the Grey report color scheme and specify Employee List as the report’s title. Click Finish.
XAF displays the Runtime Report Designer.
Click the Preview button in the upper right corner to preview the report’s print version.
Click the Design button in the upper right corner to exit the preview mode. In the menu on the right, switch to the Report Explorer.
Expand the Report | GroupHeader | table | tableRow1 item and rearrange its sub-items as displayed in the animation below. Do the same for the Detail | table2 | tableRow2 | item.
Adjust the width of the cells.
Select the Email cell. Click the gear icon in the menu on the right to open the cell’s properties. Navigate to the Appearance section and select the left border option.
Specify the same option for the LastName cell and set no borders for the FirstName cell.
Save the report and go back to the Report List View. Click the Employee List item in the grid and see the report.
The created report is also available in the Windows Forms application.
At runtime, you can use the search function, print the report, and export it in different formats such as PDF, XLS, CSV, and so on. Click the gear icon in the menu on the right to access the export settings for the available formats.
Note