ActiveReports.Viewer3 Request technical support
Print() Method
See Also  Example


Sends the document content to the printer.

Syntax

Visual Basic (Declaration) 
Overloads Public Function Print() As Boolean
Visual Basic (Usage)Copy Code
Dim instance As Document
Dim value As Boolean
 
value = instance.Print()
C# 
public bool Print()

Example

C#Copy Code
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();
}
Visual BasicCopy Code
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()
End Sub

Remarks

Use the Printer property to set printer options before printing the document.

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.

See Also