How to use the bold reports Progress and Ajax Events in ASP.NET Core App
This tutorial explains how to handle AJAX life cycle events and track long‑running operations such as export and print processes in the Bold Reports® Web Report Viewer. The video demonstrates how developers can customize request handling, monitor progress, and manage errors during report processing.
To get the information about the Progress and AJAX Events, you can check this video:
Ajax Before Load
Fires before the AJAX request process starts. This event allows you to modify request headers, authorization tokens, request data, or change the Web API action.
<div id="report-viewer"></div>
<script>
$("#report-viewer").boldReportViewer({
ajaxBeforeLoad: function (args) {
// Write a code block to modify headers, tokens, or request data
// before the AJAX request is sent to the server.
}
});
</script>Ajax Success
Fires when an AJAX POST request completes successfully. This event can be used to track server responses or log successful operations.
<div id="report-viewer"></div>
<script>
$("#report-viewer").boldReportViewer({
ajaxSuccess: function (args) {
// Write a code block to perform any action after a successful AJAX response.
}
});
</script>Ajax Error
Fires when an AJAX request fails. This event helps in handling network errors or server‑side failures.
<div id="report-viewer"></div>
<script>
$("#report-viewer").boldReportViewer({
ajaxError: function (args) {
// Write a code block to handle AJAX request errors.
}
});
</script>Export Progress Changed
Fires whenever the export progress changes. This event is useful for displaying custom export progress indicators.
<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>Print Progress Changed
Fires when the print operation progress changes. This event can be used to track page‑by‑page print processing.
<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>Implementation Workflow
AJAX Request Customization
Use AJAX events to attach authorization tokens, custom headers, or modify request payloads before sending them to the server.
Progress Monitoring
Use export and print progress events to monitor long‑running operations and provide better user feedback.