'Declaration Public Overloads Shared Function Print( _ ByVal pageDocument As PageDocument, _ ByVal showPrintDialog As Boolean, _ ByVal showPrintProgressDialog As Boolean, _ ByVal usePrintingThread As Boolean _ ) As Boolean
public static bool Print( PageDocument pageDocument, bool showPrintDialog, bool showPrintProgressDialog, bool usePrintingThread )
Parameters
- pageDocument
- The GrapeCity.ActiveReports.Document.PageDocument instance to be printed. This document contains the content and layout information for the print job.
- showPrintDialog
- Specifies whether the print dialog should be shown to the user. If set to
true
, the print dialog allows the user to modify printer settings such as the printer to use, the range of pages to print, and the number of copies. Iffalse
, the document is printed directly with the current printer settings without user interaction. - showPrintProgressDialog
- Specifies whether the print progress dialog should be displayed during the printing process. If set to
true
, the progress dialog provides feedback about the printing status to the user. Iffalse
, no progress dialog is shown. - usePrintingThread
- Determines whether the printing process should be executed on a new thread. Using a separate thread for printing can help maintain UI responsiveness during the print job. If set to
true
, the printing is performed on a new thread; iffalse
, it is performed on the current thread.
Return Value
Returns
true
if the print operation completes successfully; otherwise, returns false
. A return value of false
may indicate that the user cancelled the print job or that an error occurred during the printing process.