ActiveReports 19 .NET Edition
MESCIUS.ActiveReports.Viewer.Common Assembly / GrapeCity.ActiveReports Namespace / PrinterSettings Class
Members Example

In This Topic
    PrinterSettings Class
    In This Topic
    Manages and applies printer settings for printing reports in ActiveReports.
    Object Model
    PrinterSettings Class
    Syntax
    'Declaration
     
    Public NotInheritable Class PrinterSettings 
    public sealed class PrinterSettings 
    Remarks

    The PrinterSettings class provides a comprehensive interface for configuring printer settings specific to the needs of printing reports generated by ActiveReports. It includes options for selecting printers, defining print options, and controlling the print dialog and progress dialog visibility.

    This class also supports disposing of resources, making it critical to ensure proper resource management, especially in applications that create multiple instances for different print jobs.

    Instances of this class can be created directly for default printing scenarios or can be initialized with specific reports, printers, and print options for customized printing workflows.

    Example
    This example demonstrates how to create a PrinterSettings instance and configure it for printing a report:
    // Load the report
    var reportPath = @"C:\path\to\your\report\SalesReport.rdlx";
    var report = new GrapeCity.ActiveReports.PageReport(new System.IO.FileInfo(reportPath));
    // Create a new instance of PrinterSettings for the specific report
    var printerSettings = new GrapeCity.ActiveReports.PrinterSettings(report.Report);
    // Configure printer settings
    printerSettings.ShowPrintDialog = true;
    // Print the report
    // Note: Actual printing code would go here, using the configured printerSettings
    Inheritance Hierarchy

    System.Object
       GrapeCity.ActiveReports.PrinterSettings

    See Also