ActiveReports 6 Online Help Send comments on this topic.
Print Multiple Copies, Duplex, and Landscape
See Also
ActiveReports 6 > ActiveReports User Guide > How To > Print Multiple Copies, Duplex, and Landscape

Glossary Item Box

With ActiveReports, printer settings can be modified at design time and at run time.

Multiple Copies

ShowTo set multiple copies in the print dialog

  1. With a report displayed in the viewer, click Print.
  2. In the Print dialog that appears, next to Number of copies, select the number of copies that you want to print.

ShowTo use code to set multiple copies

  1. Double-click in the gray section below the report to create an event-handling method for the report's ReportStart event.
  2. 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.

ShowTo 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)

ShowTo 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);

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.

ShowTo open the Report Settings window

  1. Open an ActiveReport.
  2. Click on any section of the report to select it so that the Report menu appears.
  3. Drop down the Report menu and select Settings.
  4. Click Printer Settings to open the printer settings tab.

Duplex

ShowTo set duplexing in Printer Settings

  1. Open the Report Settings window and select Printer Settings.
  2. 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.
  3. Click OK to return to the report.

Orientation

ShowTo change page orientation in Printer Settings

  1. Open the Report Settings window and select Printer Settings.
  2. In the Orientation section, select either Portrait or Landscape.
  3. Click OK to return to the report.

ShowTo use code to change page orientation

  1. Double-click in the gray section below the report to create an event-handling method for the report's ReportStart event.
  2. 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.

ShowTo write the code in Visual Basic.NET

Visual Basic.NET code. Paste INSIDE the ReportStart event. Copy Code
Me.PageSettings.Orientation = PageOrientation.Landscape

ShowTo write the code in C#

C# code. Paste INSIDE the ReportStart event. Copy Code
this.PageSettings.Orientation = DataDynamics.ActiveReports.Document.PageOrientation.Landscape;

See Also