All docs
V20.2
20.2
20.1
The page you are viewing does not exist in version 20.1. This link will take you to the root page.
19.2
The page you are viewing does not exist in version 19.2. This link will take you to the root page.
19.1
The page you are viewing does not exist in version 19.1. This link will take you to the root page.
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.
.NET Standard 2.0+
.NET Framework 4.5.2+
The page you are viewing does not exist in the .NET Framework 4.5.2+ platform documentation. This link will take you to the parent topic of the current section.
.NET Standard 2.0+
.NET Core 3.0+

How to: Access the Adapter of the DxReportDesigner Component

This example demonstrates how to access the adapter of the DxReportDesigner component that Blazor XAF applications use to display reports.

When a user customize a report at runtime, a Blazor application opens a Detail View that contains ReportDesignerViewItem. Follow the steps below to access this View Item and its component:

  1. Add the DevExpress.ExpressApp.ReportsV2.Blazor NuGet package to the Blazor Module project.
  2. In the Blazor Module project, create a View Controller.
  3. Set its View property to DetailView and TargetViewId to the View's identifier. The ReportsBlazorModuleV2.ReportDesignerDetailViewName constant stores this identifier.
  4. In the overridden OnActivated method, call the CustomizeViewItemControl<T>(DetailView, Controller, Action<T>) method.
  5. Use the ViewItem.Control property to access the Report Viewer's control.
using DevExpress.ExpressApp;
using DevExpress.ExpressApp.ReportsV2.Blazor;
// ...
public class AccessReportDesginerController : ViewController<DetailView> {
    public AccessReportDesginerController() {
        TargetViewId = ReportsBlazorModuleV2.ReportDesignerDetailViewName;
    }
    protected override void OnActivated() {
        base.OnActivated();
        View.CustomizeViewItemControl<ReportDesignerViewItem>(this, CustomizeDesignerViewItem);
    }
    private void CustomizeDesignerViewItem(ReportDesignerViewItem designerDetailItem) {
        string reportName = ((ReportDesignerViewItem.DxReportDesignerAdapter)designerDetailItem.Control).ComponentModel.ReportName;
        // ...
    }
}