ComponentOne AutoComplete for ASP.NET Web Forms
C1.C1Report.4 Assembly / C1.C1Report Namespace / C1Report Class / Document Property
Example

In This Topic
    Document Property
    In This Topic
    Gets a System.Drawing.Printing.PrintDocument object that can be used to render the report to a printer or into a print preview control.
    Syntax
    'Declaration
     
    Public ReadOnly Property Document As System.Drawing.Printing.PrintDocument
    public System.Drawing.Printing.PrintDocument Document {get;}
    Example
    The examples below show how you can use the Document property to print the report or show it in a System.Windows.Forms.PrintPreviewDialog control.
    // print the report to the default printer
    _c1r.Document.Print();
                
    // show the report in a PrintPreviewDialog
    PrintPreviewDialog p = new PrintPreviewDialog():
    p.Document = _c1r.Document;
    p.ShowDialog();
    See Also