[]
        
(Showing Draft Content)

GrapeCity.ActiveReports.Viewer.Wpf.Viewer.ErrorOccured

ErrorOccured Event

Occurs when an error occurs within the viewer. This event provides detailed information about the error, allowing for custom error handling or logging.

Namespace: GrapeCity.ActiveReports.Viewer.Wpf
Assembly: MESCIUS.ActiveReports.Viewer.Wpf.dll
Syntax
public event EventHandler<ErrorInfo> ErrorOccured
Returns
Type Description
EventHandler<ErrorInfo> Occurs when an error occurs within the viewer. This event provides detailed information about the error, allowing for custom error handling or logging.
Remarks

The ErrorInfo object passed as a parameter to the event handler contains details about the error, including the exception object, a user-friendly message, and potentially other metadata related to the error condition.

Examples
viewer.ErrorOccured += (sender, e) =>
{
    // Log error details
    Console.WriteLine($"Error: {e.Exception.Message}");
    // Show a user-friendly message
    MessageBox.Show(e.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
};