Skip to main content
All docs
V25.1
  • Add Reports V2 Module to an Existing XAF Application

    • 2 minutes to read

    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
    ASP.NET Web Forms ReportsAspNetModuleV2 DevExpress.ExpressApp.ReportsV2.Web

    Next, use either of the following techniques:

    The following additional steps may be required:

    Entity Framework Core-Based Application

    1. Navigate to the MySolution.Module\BusinessObjects\MySolutionDbContext.cs file and include the ReportDataV2 entity in the data model:

      using DevExpress.Persistent.BaseImpl.EF;
      // ...
      public class MySolutionEFCoreDbContext : DbContext {
          // ...
          public DbSet<ReportDataV2> ReportData { get; set; }
          // ...
      }
      
    2. 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:

      // ...
      builder.Modules
          .AddReports(options => {
              options.EnableInplaceReports = true;
              options.ReportDataType = typeof(DevExpress.Persistent.BaseImpl.EF.ReportDataV2);
              options.ReportStoreMode = DevExpress.ExpressApp.ReportsV2.ReportStoreModes.XML;
          })
      

    ASP.NET Core Blazor Application Without Application Builder

    1. Navigate to the MySolution.Blazor.Server\Startup.cs file and call AddXafReporting in the Startup.ConfigureServices method to register the Reports V2 Module services in IServiceCollection:

      using DevExpress.ExpressApp.ReportsV2.Blazor;
      // ...
      public class Startup {
          // ...
          public void ConfigureServices(IServiceCollection services){
              //...
              services.AddXafReporting();
          }
          // ...
      }