ActiveReports 6 Online Help
Print(Boolean,Boolean,Boolean) Method
Example 

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

Specifies whether the printing is done in a separate thread or in the same thread.

If printing is done in a separate thread and the application is shut down right after the print call, the separate thread will die before the report is printed.

Sends the document content to the printer, specifying whether print and print progress dialogs will be shown, and whether printing will be done in a separate thread.
Syntax
'Declaration
 
Public Overloads Function Print( _
   ByVal showPrintDialog As Boolean, _
   ByVal showPrintProgressDialog As Boolean, _
   ByVal usePrintingThread As Boolean _
) As Boolean

Parameters

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

Specifies whether the printing is done in a separate thread or in the same thread.

If printing is done in a separate thread and the application is shut down right after the print call, the separate thread will die before the report is printed.

Remarks
Please note that the document does not exist until the report has been run, so reports must be run prior to calling the Print method.
Example
private void rptPrint_ReportStart(object sender, System.EventArgs eArgs)
{
    this.Document.Printer.PrinterSettings.Copies=5;
}

private void rptPrint_ReportEnd(object sender, System.EventArgs eArgs)
{    
    this.Document.Print(false, false, false);
}
Private Sub ActiveReport1_ReportStart(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.ReportStart
    Me.Document.Printer.PrinterSettings.Copies = 5
End Sub

Private Sub rptPrint_ReportEnd(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.ReportStart   
    Me.Document.Print(False, False, False)
End Sub
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

Document Class
Document Members
Overload List

Send Feedback