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

working with values from subreports

1 Answer 117 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Kevin
Top achievements
Rank 1
Kevin asked on 24 Oct 2012, 04:23 PM
I have a master reports with two sub reports.  Each sub report provides the sum of an item contained in different databases.  I need to be able to add these two sums together in the master report, but cannot figure out how to access the values in the sub reports to do the calculation.

Can someone tell me how I can add these two values together and display it in the master report?  If anyone has a code sample of how to do this I would really appreciate it.

Thanks

 

1 Answer, 1 is accepted

Sort by
0
IvanY
Telerik team
answered on 29 Oct 2012, 01:14 PM
Hi Kevin,

While this is possible it may not be the easiest solution (and will not be very maintainable as well). Therefore you can consider calculating those fields outside of Telerik Reporting and then passing them to your report via a hidden Report Parameter for example. This approach has one big plus and it is the fact that you can keep your SubReport and master report separated.

Other solutions such as programmatically getting the values of the subreport and passing them to the master report will be very cumbersome to implement, will cause too many dependencies between the two reports and will be very hard to maintain - it will not be a real solution, but more of a hack.

Regards,
IvanY
the Telerik team

HAPPY WITH TELERIK REPORTING? Do you feel that it is fantastic? Or easy to use? Or better than Crystal Reports? Tell the world, and help fellow developers! Write a short review about Telerik Reporting and Telerik Report Designer in Visual Studio Gallery today!

Tags
General Discussions
Asked by
Kevin
Top achievements
Rank 1
Answers by
IvanY
Telerik team
Share this question
or