expressappframework-404243-shape-export-print-data-reports-add-reports-module-to-an-existing-xaf-application.md
To add the Reports V2 module to an existing XAF application, install the appropriate NuGet package:
| Platform | Module | NuGet package |
|---|---|---|
| platform-agnostic | ReportsModuleV2 | DevExpress.ExpressApp.ReportsV2 |
| ASP.NET Core Blazor | DevExpress.ExpressApp.ReportsV2.Blazor.ReportsBlazorModuleV2 | DevExpress.ExpressApp.ReportsV2.Blazor |
| WinForms | ReportsWindowsFormsModuleV2 | DevExpress.ExpressApp.ReportsV2.Win |
Next, use either of the following techniques:
In XAF applications, you can call the AddReports(IModuleBuilder<IBlazorApplicationBuilder>, Action<ReportsOptions>) / AddReports(IModuleBuilder<IWinApplicationBuilder>, Action<ReportsOptions>) method in your ASP.NET Core Blazor / WinForms application builder.
If you do not use an application builder, you can add these Modules to the ModuleBase.RequiredModuleTypes collection of the platform-specific Module.
The following additional steps may be required:
Navigate to the MySolution.Module\BusinessObjects\MySolutionDbContext.cs file and include the ReportDataV2 entity in the data model:
Navigate to the MySolution.Blazor.Server\Startup.cs file (ASP.NET Core Blazor) or the MySolution.Win\Startup.cs file (Windows Forms) and specify the ReportDataType explicitly:
AddXafReporting in the Startup.ConfigureServices method to register the Reports V2 Module services in IServiceCollection: