How to bind Sub Report to Main Report's Data
|Product||Progress® Telerik® Reporting|
Telerik Reporting Expression engine allows you to reuse the data of a parent scope. This includes binding a subreport to the main report's data.
This article provides the required steps for binding the SubReport to the Main Report's Data.
- Open the report that will be used as a subreport in the designer and use the following binding to the report's DataSource property:
Property path: DataSource Expression: =ReportItem.DataObject
When the subreport is loaded by a SubReport item in the main report, the sub report will get the data associated with the SubReport item.
- You can change the scope to a greater parent by using the Parent keyword. For example:
Property path: DataSource Expression: =ReportItem.Parent.Parent.DataObject
In case you need to display data in a tabular format, another approach for organizing the main report's layout can be found in How to Databind to Collection Properties.
How to use the ReportItem.DataObject property in expressions.