How to use Report Load and Error Events in Angular Application
This tutorial explains how to handle error-related events in the Bold Reports® Web Report Viewer. The video demonstrates how developers can capture report processing errors and customize the way error details are displayed to users.
Report Error
Fires when an error occurs during report processing or rendering. This event allows you to capture error information and perform custom actions such as logging or displaying custom messages.
<div id="report-viewer"></div>
<script>
$("#report-viewer").boldReportViewer({
reportError: function (args) {
// Write a code block to perform any action when a report error occurs.
// args.error contains the error details.
}
});
</script>Show Error
Fires when a user clicks on a failed report item in the rendered report, before the error details dialog is displayed. This event allows you to customize or override the default error display behavior.
<div id="report-viewer"></div>
<script>
$("#report-viewer").boldReportViewer({
showError: function (args) {
// Write a code block to perform any action
// before showing the error details dialog.
// args.cancel = true; // Cancels the default error dialog
}
});
</script>Implementation Workflow
Error Detection
Use the report Error event to identify issues that occur during report rendering or processing.
Error Presentation
Use the show Error event to control how error messages and detailed information are presented to users.
To learn more about handling Report Error Events, refer to this video again: