ActiveReports 6 Online Help
Landscape Property (Printer)
Example 

Gets or sets a value indicating whether the page is printed in landscape or portrait orientation.
Syntax
'Declaration
 
Public Property Landscape As Boolean
public bool Landscape {get; set;}

Property Value

True if the page should be printed in landscape orientation; otherwise, False. The default is determined by the printer.
Example
private void arv_Load(object sender, System.EventArgs e)
{
    ActiveReport1 rpt = new ActiveReport1();
    System.Drawing.Printing.PaperSize p = new System.Drawing.Printing.PaperSize("Custom Paper Size", 400, 900); //hundredths of an inch
    rpt.Document.Printer.PrinterName = ""; //use the virtual print driver for paper sizes not supported by the local printer
    rpt.Document.Printer.PaperKind = System.Drawing.Printing.PaperKind.Custom;
    rpt.Document.Printer.PaperSize = p;
    rpt.Document.Printer.Landscape = true;
    rpt.Run();
    arv.Document = rpt.Document;
}
Private Sub arv_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles arv.Load
    Dim rpt As New ActiveReport1
    Dim p As New System.Drawing.Printing.PaperSize("Custom Paper Size", 400, 900) 'hundredths of an inch
    With rpt.Document.Printer
        .PrinterName = "" 'use the virtual print driver for paper sizes not supported by the local printer
        .PaperKind = Printing.PaperKind.Custom
        .PaperSize = p
        .Landscape = True
    End With
    rpt.Run()
    arv.Document = rpt.Document
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

Printer Class
Printer Members

Send Feedback