How to handle Report Print, Export, and Server Request Events in Blazor App

This tutorial explains how to handle print progress, export progress, and server request (AJAX) events in the Bold Reports® Web Report Viewer within a Blazor application. The video demonstrates how developers can track long‑running operations and customize server communication during report processing.


Fires whenever the print operation progress changes. This event can be used to display print status or progress information to users.

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

Export Progress Changed

Fires when the report export progress changes. This event is useful for showing custom progress indicators during long‑running export operations.

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

Ajax Before Load

Fires before a request is sent from the Report Viewer to the server. This event allows you to modify request headers, inject authorization tokens, or customize request data.

<div id="report-viewer"></div>
<script>
    $("#report-viewer").boldReportViewer({
        ajaxBeforeLoad: function (args) {
            // Write a code block to modify headers, tokens,
            // or request data before sending it to the server.
        }
    });
</script>

Implementation Workflow

Use the printProgressChanged and exportProgressChanged events to track and display progress during printing and exporting operations.

Server Request Customization

Use the ajaxBeforeLoad event to customize server requests, attach authentication tokens, or modify request payloads dynamically.

To get more details about Print, Export, and Server Request Events in Blazor applications, you can check this video: