Skip to main content
All docs
V24.2

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

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:

    C#
    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:

    C#
    // ...
    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:

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