ActiveReports 19 .NET Edition
MESCIUS.ActiveReports.Viewer.Win Assembly / GrapeCity.ActiveReports.Viewer.Win Namespace / Viewer Class / Print Method / Print(PrintingSettings) Method
The printing settings to be used for this print job. This includes options for showing the print dialog, the print progress dialog, and whether to use a separate printing thread.
Example

In This Topic
    Print(PrintingSettings) Method
    In This Topic
    Initiates the printing process for the currently opened document, using the specified printing settings.
    Syntax
    'Declaration
     
    Public Overloads Function Print( _
       ByVal settings As PrintingSettings _
    ) As Boolean
    public bool Print( 
       PrintingSettings settings
    )

    Parameters

    settings
    The printing settings to be used for this print job. This includes options for showing the print dialog, the print progress dialog, and whether to use a separate printing thread.

    Return Value

    Returns true if the printing process is successfully initiated; otherwise, returns false. Note that a return value of true indicates successful initiation of the print job but does not guarantee its completion.
    Exceptions
    ExceptionDescription
    Thrown if the method is called while the document is not in a completed load state, indicating that the document is not ready for printing.
    Remarks
    This method allows for a flexible printing process by utilizing a PrintingSettings object to specify the desired printing behavior. It is designed to accommodate various printing scenarios, from direct printing with default settings to interactive printing with user-selected settings.
    Example
    // Assuming 'viewer' is an instance of the Viewer class
    // Configure printing to show print dialog, print progress dialog, and use a separate printing thread
    viewer.Print(PrintingSettings.ShowPrintDialog | PrintingSettings.ShowPrintProgressDialog | PrintingSettings.UsePrintingThread);
    See Also