Reports for WPF | ComponentOne
C1.C1Report Namespace / C1Report Class / Document Property
Example

In This Topic
    Document Property (C1Report)
    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 PrintDocument
    public PrintDocument Document {get;}
    Example
    The examples below show how you can use the C1Report.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