ActiveReports 19 .NET Edition
MESCIUS.ActiveReports Assembly / GrapeCity.ActiveReports.Document Namespace / SectionDocument Class / Printer Property
Example

In This Topic
    Printer Property (SectionDocument)
    In This Topic
    Gets a value reprsenting the printer properties for report printing.
    Syntax
    'Declaration
     
    Public ReadOnly Property Printer As Printer
    public Printer Printer {get;}

    Property Value

    A Printer value that represents settings for a printer.
    Remarks
    Setting the Printer.PrinterName to the string.Empty value does not depend on the settings of the particular printer.
    Example
    Set a specific printer Set default printer
    var sectionDocument = new GrapeCity.ActiveReports.Document.SectionDocument();
    sectionDocument.Load("Document.rdf");
    sectionDocument.Printer.PrinterName = "TheNetworkPrinterName";
    sectionDocument.Printer.Landscape = true;
    //To call the Print method, add a reference to Viewer.Win or Viewer.WPF
    sectionDocument.Print();
    var sectionReport = new GrapeCity.ActiveReports.SectionReport();
    using (var reader = new System.Xml.XmlTextReader("Report.rpx"))
    {
    	sectionReport.LoadLayout(reader, out System.Collections.ArrayList error);
    }
    sectionReport.Document.Printer.PrinterName = String.Empty;
    viewer.LoadDocument(sectionReport);
    See Also