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() End Sub
private void PrintReport() { // 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(); }
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
Report Class
Report Members
Overload List
ReportProgressControl Class
Export(OutputFormat) Method
Export(OutputFormat,String) Method
Export(OutputFormat,String,Boolean) Method
Export(OutputFormat,Stream) Method
Print(Boolean,Boolean) Method
Print(Boolean,Boolean,FrameworkElement) Method
ShowPrintDialog Method
GeneratePreview Method