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

    1. Install the following NuGet packages:

    2. Call the AddReports method in the Startup.cs file of each project that will use Reports. In the method call, specify the ReportDataType property value.

      Files: SolutionName.WebApi\Startup.cs, SolutionName.Blazor.Server\Startup.cs, SolutionName.Win\Startup.cs, SolutionName.MiddleTier\Startup.cs.

      // ...
      builder.Modules
          .AddReports(options => {
              options.ReportDataType = typeof(DevExpress.Persistent.BaseImpl.EF.ReportDataV2);
          // ...
      
    3. If your application is based on the Entity Framework Core, navigate to the SolutionName.Module\BusinessObjects\SolutionDbContextName.cs file and include the ReportDataV2 class in the data model:

      using DevExpress.Persistent.BaseImpl.EF;
      // ...
      public class SolutionEFCoreDbContextName : DbContext {
          public DbSet<ReportDataV2> ReportData { get; set; }
          // ...
      }
      
    See Also