ActiveReports 19 .NET Edition
MESCIUS.ActiveReports.Viewer.Common Assembly / GrapeCity.ActiveReports Namespace / PrinterSettings Class / PrinterSettings Constructor / PrinterSettings Constructor(Report,String)
The report to print.
The name of the report.
Example

In This Topic
    PrinterSettings Constructor(Report,String)
    In This Topic
    Creates a new instance of PrinterSettings for a specific report.
    Syntax
    'Declaration
     
    Public Function New( _
       ByVal report As Report, _
       Optional ByVal reportName As String _
    )
    public PrinterSettings( 
       Report report,
       string reportName
    )

    Parameters

    report
    The report to print.
    reportName
    The name of the report.
    Example
    // Load the report
    var reportPath = @"C:\path\to\your\report\SalesReport.rdlx";
    var report = new GrapeCity.ActiveReports.PageReport(new System.IO.FileInfo(reportPath));
    // Optionally, specify a custom name for the print job
    string reportName = "Monthly Sales Report";
    // Create a new instance of PrinterSettings for the specific report
    var printerSettings = new GrapeCity.ActiveReports.PrinterSettings(report.Report, reportName);
    // Configure additional printer settings as needed
    printerSettings.ShowPrintDialog = true;
    printerSettings.ShowPrintProgressDialog = true;
    printerSettings.UsePrintingThread = true;
    // Example: Print the report
    // Note: Actual printing code would go here, using the configured printerSettings
    See Also