ActiveReports 19 .NET Edition
MESCIUS.ActiveReports.Viewer.Common Assembly / GrapeCity.ActiveReports Namespace / PrintExtension Class / Print Method / Print(SectionDocument) Method
The section document to print.
Example

In This Topic
    Print(SectionDocument) Method
    In This Topic
    Initiates the printing process for a section-based document with default settings.
    Syntax
    'Declaration
     
    Public Overloads Shared Function Print( _
       ByVal sectionDocument As SectionDocument _
    ) As Boolean
    public static bool Print( 
       SectionDocument sectionDocument
    )

    Parameters

    sectionDocument
    The section document to print.

    Return Value

    true if the printing process completes successfully; otherwise, false.
    Remarks
    This method prints the document using the default settings: showing the print dialog, showing the print progress dialog, and using the printing thread. It simplifies the printing process for common scenarios.
    Example
    The following example demonstrates how to print a section document using default settings:
    SectionDocument sectionDocument = new SectionDocument();
    sectionDocument.Load("C:\\Report.rdf");
    sectionDocument.PrintOptions.PrintPageBorder = true;
    bool printSuccess = sectionDocument.Print();
    if (printSuccess)
        Console.WriteLine("Printing completed successfully.");
    else
        Console.WriteLine("Printing failed.");
    See Also