To preview the report, use the use the C1Report.Document property. Assign it to the Document property in the Reports for WinForms preview control or to the .NET PrintPreview or PrintPreviewDialog controls and the preview controls will display the report and allow the user to browse, zoom, or print it. For example:
To write code in Visual Basic
Visual Basic |
Copy Code
|
---|---|
' Load report definition c1r.Load(reportFile, reportName) ' Preview the document c1preview1.Document = c1r |
To write code in C#
C# |
Copy Code
|
---|---|
// Load report definition c1r.Load(reportFile, reportName); // Preview the document c1preview1.Document = c1r; |