ActiveReports 19 .NET Edition
MESCIUS.ActiveReports.Viewer.Common Assembly / GrapeCity.ActiveReports Namespace / PrinterSettings Class / PrintAborted Event
Example

In This Topic
    PrintAborted Event (PrinterSettings)
    In This Topic
    Occurs when the printing process is aborted.
    Syntax
    'Declaration
     
    Public Event PrintAborted As PrintAbortedEventHandler
    public event PrintAbortedEventHandler PrintAborted
    Remarks
    This event is raised if the printing process is aborted for any reason, such as by user action or a printing error that prevents the completion of the print job. Subscribing to this event allows the application to respond appropriately when a print job does not complete successfully, such as by notifying the user, logging the incident, or attempting to restart the printing process.
    Example
    This example demonstrates how to subscribe to the PrintAborted event and handle it:
    GrapeCity.ActiveReports.PrinterSettings printerSettings = new GrapeCity.ActiveReports.PrinterSettings();
    printerSettings.PrintAborted += PrinterSettings_PrintAborted;
    private void PrinterSettings_PrintAborted(object sender, EventArgs e)
    {
        Console.WriteLine("The printing process has been aborted.");
        // Additional logic to handle the aborted print job can be added here
    }
    See Also