Public Sub SelectElements( _ ByVal elements As IReadOnlyList(Of Element) _ )
public void SelectElements( IReadOnlyList<Element> elements )
Parameters
- elements
- A list of existing report elements. If null then all elements are unselected.
Public Sub SelectElements( _ ByVal elements As IReadOnlyList(Of Element) _ )
public void SelectElements( IReadOnlyList<Element> elements )
{
//Get the "ReportSection element"
//ReportSectionElement contains the ReportHeader, ReportPageHeader, ReportDetails. ReportPageFooter, ReportFooter sections.
var mainReportSection = report.Elements.OfType<ReportSection>().FirstOrDefault();
//ReportDetailsSection contains the "Fields"
//Get the "ReportDetails" within the ReportSectionElement. ReportDetails is where "fields" are.
var reportDetailsSection = mainReportSection?.Elements.OfType<ReportDetails>().FirstOrDefault();
var elements = reportDetailsSection.Elements;
reportDetailsSection.SelectElements(elements);
}
Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)