Gets a PrintDocument object that can be used to render the report to a printer or into a print preview control.

Namespace:  C1.C1Report
Assembly:  C1.C1Report.2 (in C1.C1Report.2.dll)

Syntax

C#
[BrowsableAttribute(false)]
public PrintDocument Document { get; }
Visual Basic
<BrowsableAttribute(False)> _
Public ReadOnly Property Document As PrintDocument
	Get

Examples

The following example shows how you can use the Document property to print the report or show it in a PrintPreviewDialog control:

Copy CodeVisual Basic
' print the report to the default printer
c1r.Document.Print()
' show the report in a PrintPreviewDialog
Dim ppv As New PrintPreviewDialog()
ppv.Document = c1r.Document
ppv.ShowDialog()
Copy CodeC#
// print the report to the default printer
c1r.Document.Print();
// show the report in a PrintPreviewDialog
PrintPreviewDialog ppv = new PrintPreviewDialog();
ppv.Document = c1r.Document;
ppv.ShowDialog();

For an example using the Document property, see the Previewing Reports and Printing Reports topics.

See Also