'Declaration Public Class EmbeddedVisualReportSection Inherits ReportSection
public class EmbeddedVisualReportSection : ReportSection
An instance of this class can be added to a Report's Report.Sections collection. Then, when a pagination process is started, by calling Report.Export or Report.Print on Report, the EmbeddedVisualReportSection class creates an instance of a ReportPagePresenter and sets its content based on the parameters passed into one of its constructors. It then rasies the PaginationStarting, PaginationStarted and finally the PaginationEnded events.
The EmbeddedVisualReportSection class can contain three types of objects, supplied in the constructor:
Note: each section in a Report starts on a new page. For example, if you created a Report with 3 EmbeddedVisualReportSections, one with a XamDataGrid and 2 others with simple visual elements, each section would start on a new page even though there might have been available space on the last page from the previous section.
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); }
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