How to handle Report viewer events in Blazor Web Assembly

This tutorial explains how to handle rendering and export‑related events in the Bold Reports® Web Report Viewer within a Blazor Web Assembly application. The video demonstrates how developers can hook into the report life cycle to manage rendering flow, handle cancellations, and intercept export actions.


renderingBegin

Fires before the report rendering process starts. This event can be used to perform pre‑rendering operations such as showing loading indicators or validating conditions.

<div id="report-viewer"></div>
<script>
    $("#report-viewer").boldReportViewer({
        renderingBegin: function (args) {
            // Write a code block to perform any operation before rendering begins.
        }
    });
</script>

Report Export

Fires when the report export process is initiated. This event allows you to intercept or customize export behavior before the file is generated.

<div id="report-viewer"></div>
<script>
    $("#report-viewer").boldReportViewer({
        reportExport: function (args) {
            // Write a code block to perform any operation before exporting the report.
        }
    });
</script>

Report Canceled

Triggered when the report rendering or export process is canceled by the user. This event is helpful for handling cleanup or UI reset actions.

<div id="report-viewer"></div>
<script>
    $("#report-viewer").boldReportViewer({
        reportCanceled: function (args) {
            // Write a code block to perform any action when report processing is canceled.
        }
    });
</script>

Implementation Workflow

Rendering Control

Use rendering life cycle events to track and control report generation flow.

Export Interception

Use export‑related events to validate, log, or customize report exports.

Cancellation Handling

Handle user‑triggered cancellations gracefully using the report Canceled event.

To get more details about Rendering and Export Events in Blazor Web Assembly, you can check this video: