Back to Devexpress

How to: Access the Report Preview Control (ASP.NET Core Blazor)

expressappframework-402260-shape-export-print-data-reports-task-based-help-how-to-access-the-report-preview-control-blazor.md

latest1.1 KB
Original Source

How to: Access the Report Preview Control (ASP.NET Core Blazor)

  • May 15, 2024

This example accesses the DxDocumentViewer component that ASP.NET Core Blazor XAF applications use to display reports.

When a user previews a report, an XAF ASP.NET Core Blazor application opens a Detail View that contains a ReportViewerViewItem. Follow the steps below to access this View Item and its component:

  1. Add the Reports V2 Module to your application. For more information, refer to the following topic: Add Reports V2 Module to an Existing XAF Application.
  2. Create a Detail View Controller and specify the TargetViewId as ReportsBlazorModuleV2.ReportViewerDetailViewName.
  3. Override the OnActivated method and access the Report Viewer’s control as demonstrated in the following code snippet: