This is a migrated thread and some comments may be shown as answers.

SubReport Totals in Main Report

1 Answer 292 Views
Report Designer (standalone)
This is a migrated thread and some comments may be shown as answers.
Stephen
Top achievements
Rank 1
Stephen asked on 14 Oct 2020, 08:22 PM

We are busy with a POC and we have 4 sub reports on our main reports. In each subreport there is an aggregated total in the footer that we want to return and display as a summary value in the main report header section.

 

Is it possible to write an expression to access the value on a text box in the sub report from the main report?

 

Or is there a different way to do this?

1 Answer, 1 is accepted

Sort by
0
Nasko
Telerik team
answered on 19 Oct 2020, 06:11 PM

Hello Stephen,

It is not possible to access the value of a sub-report text box from another text box in the main report. One way to show the summary value in the main report would be to have the same data available in the main report. I will try to summarize the different situations that can arise while building such report:

Main report and sub-report use separate and different data sources

In this situation you will need to add the sub-report's data source to the main report as well. Then you can add a data item to the main report's header section, for example a List item, and bind it to this data source. The List will initially display many records, but with a suitable grouping only a single record(text box) containing the summary value will be left.

Sub-report reuses the data from the main report

In this situation the sub-report's data source is bound to ReportItem.DataObject via a binding, which means that the data from the main report is being reused inside the sub-report. You can create the List the same way as explained above and bind it to the same data as the data in the sub-report.

Regards,
Nasko
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
Report Designer (standalone)
Asked by
Stephen
Top achievements
Rank 1
Answers by
Nasko
Telerik team
Share this question
or