With ActiveReports, printer settings can be modified at design time and at run time.
To set multiple copies in the print dialog
To use code to set multiple copies
The following example shows what the code for the method looks like for printing five copies.
To write the code in Visual Basic.NET
Visual Basic.NET code. Paste INSIDE the ReportStart event. |
Copy Code |
---|---|
Me.Document.Printer.PrinterSettings.Copies = 5 |
Visual Basic.NET code. Paste INSIDE the ReportEnd event. |
Copy Code |
---|---|
Me.Document.Print(false, false) |
To write the code in C#
C# code. Paste INSIDE the ReportStart event. |
Copy Code |
---|---|
this.Document.Printer.PrinterSettings.Copies = 5; |
C# code. Paste INSIDE the ReportEnd event. |
Copy Code |
---|---|
this.Document.Print(false, false); |
At design time, you can set paper size, orientation, collation, duplexing or paper source on the Printer Settings tab of the Report Settings window.
To open the Report Settings window
To set duplexing in Printer Settings
To change page orientation in Printer Settings
To use code to change page orientation
![]() |
Note: Page orientation can only be modified before the report runs. Otherwise, changes made to the page orientation are not used during printing. |
The following example shows what the code for the method looks like.
To write the code in Visual Basic.NET
Visual Basic.NET code. Paste INSIDE the ReportStart event. |
Copy Code |
---|---|
Me.PageSettings.Orientation = PageOrientation.Landscape |
To write the code in C#
C# code. Paste INSIDE the ReportStart event. |
Copy Code |
---|---|
this.PageSettings.Orientation = DataDynamics.ActiveReports.Document.PageOrientation.Landscape; |