ActiveReports 19 .NET Edition
MESCIUS.ActiveReports.Viewer.Common Assembly / GrapeCity.ActiveReports Namespace / PrintExtension Class / Print Method / Print(SectionDocument,PrintingSettings) Method
The document to be printed.
The printing settings to apply.
Example

In This Topic
    Print(SectionDocument,PrintingSettings) Method
    In This Topic
    Prints the section-based document using specified printing settings.
    Syntax
    'Declaration
     
    Public Overloads Shared Function Print( _
       ByVal sectionDocument As SectionDocument, _
       ByVal settings As PrintingSettings _
    ) As Boolean
    public static bool Print( 
       SectionDocument sectionDocument,
       PrintingSettings settings
    )

    Parameters

    sectionDocument
    The document to be printed.
    settings
    The printing settings to apply.

    Return Value

    true if the print operation was successful; otherwise, false.
    Remarks
    This method decodes the provided settings to determine the configuration for the print operation, such as whether to show the print dialog, the print progress dialog, use a printing thread, and the style of the dialog.
    Example
    The following example demonstrates how to print a section document with custom printing settings:
    SectionDocument sectionDocument = new SectionDocument();
    sectionDocument.Load("C:\\Report.rdf");
    PrintingSettings settings = PrintingSettings.UseStandardDialog | PrintingSettings.ShowPrintDialog;
    bool printSuccess = sectionDocument.Print(settings);
    if (printSuccess)
        Console.WriteLine("Printing completed successfully with custom settings.");
    else
        Console.WriteLine("Printing failed.");
    See Also