'A print dialog will not be shown to the end user; however, a progress bar will be shown to the end user. xamReportPreview1.GeneratePreview(report1, False, True)
You can use the xamReportPreview™ control to display a print preview of a report to your end users. There are four steps required to display a print preview:
Pass the Report object to the Window that is hosting the xamReportPreview control.
This topic does not discuss the implementation details on passing a Report object to a Window that is hosting the xamReportPreview control.
Call xamReportPreview’s GeneratePreview method and pass in a Report object as a parameter.
The two Boolean parameters determine if your end users will see a print dialog and a progress bar when you generate a preview.
The following example code demonstrates how to show a print preview. The example code assumes you already have a Report object name report1 and a xamReportPreview control named xamReportPreview1.
In Visual Basic:
'A print dialog will not be shown to the end user; however, a progress bar will be shown to the end user. xamReportPreview1.GeneratePreview(report1, False, True)
In C#:
//A print dialog will not be shown to the end user; however, a progress bar will be shown to the end user. xamReportPreview1.GeneratePreview(report1, false, true);