Version

Print(Boolean,Boolean) Method

Prints the report and can show an optional progress window as well as a standard print dialog.
Syntax
'Declaration
 
Public Overloads Sub Print( _
   ByVal showPrintDialog As Boolean, _
   ByVal showReportProgressControl As Boolean _
) 
public void Print( 
   bool showPrintDialog,
   bool showReportProgressControl
)

Parameters

showPrintDialog
If true a standard print dialog is firat displayed to the user before printing begins.
showReportProgressControl
If true a progress window is displayed during the print operation.
Example
This sample shows how to create report, set its content and print it. In the sample XamDataGrid1 is an instance of XamDataGrid.

Imports Infragistics.Windows.Reporting
 
Private  Sub CreateReport()
    ' 1. Create Report object
    Dim reportObj As Report =  New Report() 
 
    ' 2. Create EmbeddedVisualReportSection section. 
    ' Put the grid you want to print as a parameter of section's constructor
    Dim section As EmbeddedVisualReportSection =  New EmbeddedVisualReportSection(XamDataGrid1) 
 
    ' 3. Add created section to report's section collection
    reportObj.Sections.Add(section)
 
    ' Optional. If you have progress indicator set its Report property to created report
    progressInfo.Report = reportObj
 
    ' 4. Call print method
    reportObj.Print(True, False)
End Sub
using Infragistics.Windows.Reporting;

private void CreateReport()
{
    // 1. Create Report object
    Report reportObj = new Report();

    // 2. Create EmbeddedVisualReportSection section. 
    // Put the grid you want to print as a parameter of section's constructor
    EmbeddedVisualReportSection section = new EmbeddedVisualReportSection(XamDataGrid1);

    // 3. Add created section to report's section collection
    reportObj.Sections.Add(section);

    // Optional. If you have progress indicator set its Report property to created report
    progressInfo.Report = reportObj;

    // 4. Call print method
    reportObj.Print(true, false);
}
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also