Version

Sections Property

Returns a collection of Infragistics.Windows.Reporting.ReportSection objects.
Syntax
'Declaration
 
Public ReadOnly Property Sections As ReportSectionCollection
public ReportSectionCollection Sections {get;}
Remarks

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.

Example
This example shows how to populate report with more than one section. In example XamDataGrid1 is an instance of XamDataGrid, and XamDataGrid2 is another instance of XamDataGrid

Private Sub CreateReport()

    ' 1. Create Report object
    Dim reportObj As New Report()
    
    ' 2. Create EmbeddedVisualReportSection section. 
    ' Put the grid you want to print as a parameter of section's constructor
    Dim gridSection As New EmbeddedVisualReportSection(XamDataGrid1)
    Dim anothergridSection As New EmbeddedVisualReportSection(XamDataGrid2)
    
    ' 3. Add created sections to report's section collection
    reportObj.Sections.Add(gridSection)
    reportObj.Sections.Add(anothergridSection)
    
    ' 4. Call print method
    reportObj.Print(False, True)
End Sub
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 gridSection = new EmbeddedVisualReportSection(XamDataGrid1);
	EmbeddedVisualReportSection anothergridSection = new EmbeddedVisualReportSection(XamDataGrid2);

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

	// 4. Call print method
	reportObj.Print(false, true);
}
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