ActiveReports 19 .NET Edition
MESCIUS.ActiveReports.Viewer.Win Assembly / GrapeCity.ActiveReports.Viewer.Win Namespace / Viewer Class / Print Method / Print(Boolean) Method
Specifies whether or not the Print dialog should be shown.
Example

Print(Boolean) Method
Initiates the printing process for the currently opened document, either a section or a page report, with the option to display or bypass the print dialog.
Syntax
'Declaration
 
Public Overloads Function Print( _
   ByVal showPrintDialog As Boolean _
) As Boolean
 

Parameters

showPrintDialog
Specifies whether or not the Print dialog should be shown.

Return Value

Returns true if the printing process is initiated successfully; otherwise, returns false. Note that a return value of true does not guarantee the completion of the printing process, but rather the successful initiation of the print job.
Remarks
This overload of the Print method uses default settings for showing the print progress dialog and using a printing thread. To customize these settings, consider using the overload that accepts these parameters explicitly.
Example
// Assuming 'viewer' is an instance of the Viewer class
// This will print to the default printer without showing the print dialog
bool printSuccess = viewer.Print(showPrintDialog: false);
if (printSuccess)
    MessageBox.Show("Printing initiated successfully.");
else
    MessageBox.Show("Printing failed.");
See Also