Skip to main content
All docs
V25.2
  • DxReportViewer.OnReportOpened Event

    Occurs when a report is opened in the Report Viewer.

    Namespace: DevExpress.Blazor.Reporting

    Assembly: DevExpress.Blazor.Reporting.v25.2.Viewer.dll

    NuGet Package: DevExpress.Blazor.Reporting.Viewer

    Declaration

    [Parameter]
    public EventCallback<ReportOpenedEventArgs> OnReportOpened { get; set; }

    Parameters

    Type Description
    ReportOpenedEventArgs

    The event data.

    Remarks

    This event is raised after the report is loaded. Handle it to adjust viewer behavior.

    Example

    You can handle the OnReportOpened event to change the active tab panel.

    The following code snippet activates the Parameter Panel when a report is opened (the report’s RequestParameters property is set to false):

    @using DevExpress.Blazor.Reporting
    @using DevExpress.Blazor.Reporting.Models
    @using DevExpress.XtraReports.UI
    @using DxBlazorApplication.PredefinedReports
    
    <DxReportViewer @ref="reportViewer" Report="Report" OnReportOpened="OnReportOpened" />
    
    @code {
        DxReportViewer reportViewer;
        XtraReport Report = new TestReport();
    
        private void OnReportOpened(ReportOpenedEventArgs args) {
            reportViewer.TabPanelModel.ActivateTab(TabId.Parameters);
        }
    }
    
    See Also