With ActiveReports, printer settings can be modified at design time and at run time.
Multiple Copies
To set multiple copies in the print dialog
- With a report displayed in the viewer, click Print.
- In the Print dialog that appears, next to Number of copies, select the number of copies that you want to print.
To use code to set multiple copies
- Double-click in the gray section below the report to create an event-handling method for the report's ReportStart event.
- Add code to the handler to set multiple copies of the report for printing.
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) | |
| 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); | |
Printer Settings
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
- Open an ActiveReport.
- Click on any section of the report to select it so that the Report menu appears.
- Drop down the Report menu and select Settings.
- Click Printer Settings to open the printer settings tab.
Duplex
To set duplexing in Printer Settings
- Open the Report Settings window and select Printer Settings.
- Next to Duplex, select one of the following options:
- Printer Default: The report uses the default setting on the selected printer.
- Simplex: Turns off duplex printing.
- Horizontal: Prints horizontally on both sides of the paper.
- Vertical: Prints vertically on both sides of the paper.
- Click OK to return to the report.
Orientation
To change page orientation in Printer Settings
- Open the Report Settings window and select Printer Settings.
- In the Orientation section, select either Portrait or Landscape.
- Click OK to return to the report.
To use code to change page orientation
- Double-click in the gray section below the report to create an event-handling method for the report's ReportStart event.
- Add code to the handler to change the page orientation of the report for printing.
![]() |
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 | |
| C# code. Paste INSIDE the ReportStart event. | Copy Code |
|---|---|
| this.PageSettings.Orientation = DataDynamics.ActiveReports.Document.PageOrientation.Landscape; | |
Concepts
Report and Page Settings
Related Sections
Getting Started
Hide All