Hi,
I have following situation: I have header/detail report (master/subreport). I have items in subreport and I want to display summary of some of their fields on master report too. How can I make cross-reference and access values as Sum(Field.Quantity) etc.? Thx in advance.
Best regards,
Daniel
I have following situation: I have header/detail report (master/subreport). I have items in subreport and I want to display summary of some of their fields on master report too. How can I make cross-reference and access values as Sum(Field.Quantity) etc.? Thx in advance.
Best regards,
Daniel
6 Answers, 1 is accepted
0
Hello Daniel,
You can use the ReportFooter of the Report used as the SubReport's Source in order to show aggregates for each SubReport. I am not entirely sure what do you mean by displaying aggregates from the subreport on the master report. When should they be displayed and where? You can help us a lot to solve your case if you send us your report and a picture of what you would like it to look like with those summaries. A detailed description of your goal would be very helpful as well.
I am looking forward to hearing from you.
All the best,
Ross
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
You can use the ReportFooter of the Report used as the SubReport's Source in order to show aggregates for each SubReport. I am not entirely sure what do you mean by displaying aggregates from the subreport on the master report. When should they be displayed and where? You can help us a lot to solve your case if you send us your report and a picture of what you would like it to look like with those summaries. A detailed description of your goal would be very helpful as well.
I am looking forward to hearing from you.
All the best,
Ross
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0

Daniel
Top achievements
Rank 1
answered on 04 Aug 2008, 01:53 PM
Hi Ross,
by those aggregates I mean summaries in master report's footer - imagine document (master) - items (detail) relation for let's say invoice. When I have some discount for the invoice which is store in master data table (document header - which is implemented as master report), I want to show total price (which I get by summarizing items - i.e. subreport) and make some calculation with that discoult. That would be done & displayed on master report, not in detail. Is it clearer now?
Regards,
Daniel
by those aggregates I mean summaries in master report's footer - imagine document (master) - items (detail) relation for let's say invoice. When I have some discount for the invoice which is store in master data table (document header - which is implemented as master report), I want to show total price (which I get by summarizing items - i.e. subreport) and make some calculation with that discoult. That would be done & displayed on master report, not in detail. Is it clearer now?
Regards,
Daniel
0
Hello Daniel,
Now I see what you mean. You can achieve that without using sub-reports. You can join your two tables and achieve master-detail by using Grouping. Your GroupHeader will contain the "document (master)", the detail sections between this GroupHeader and the GroupFooter will contain the invoice "items", and the GroupFooter will contain text-boxes with expressions that calculate the aggregates of your choice. The grouping criteria for your Group should be the field that establishes the master-detail relationship, i.e. unique invoice id/number, etc.
More about Grouping Report Data you can find here.
Please try this approach and let us know if you have any troubles.
Kind regards,
Ross
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Now I see what you mean. You can achieve that without using sub-reports. You can join your two tables and achieve master-detail by using Grouping. Your GroupHeader will contain the "document (master)", the detail sections between this GroupHeader and the GroupFooter will contain the invoice "items", and the GroupFooter will contain text-boxes with expressions that calculate the aggregates of your choice. The grouping criteria for your Group should be the field that establishes the master-detail relationship, i.e. unique invoice id/number, etc.
More about Grouping Report Data you can find here.
Please try this approach and let us know if you have any troubles.
Kind regards,
Ross
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0

Daniel
Top achievements
Rank 1
answered on 04 Aug 2008, 03:53 PM
Yes, this is one option, but not very optimal. Quite a lot of data is duplicated (if we have 20 columns in headers and then 10 in detail, grouping scenario would result in 30 columns of results, with those header 20 being there for each item. If you are making report for 20 invoices, each with 15 items, it is 300 rows each with 20 columns of redundant data.).
0
Accepted
Hi Daniel,
In response of your request, we demonstrate the flexibility of our Reporting offering by preparing an example of Master/Detail report. As you can see it is easy to navigate trough our Reporting object model and find subreport textboxes containing aggregates and use their values in the master report. Additionally we represent optimal binding of Master/Detail reports. Please note how data is retrieved in the Details report by using Report parameter to update sql query parameter in the NeedDataSource handler.
Kind regards,
Hrisi
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
In response of your request, we demonstrate the flexibility of our Reporting offering by preparing an example of Master/Detail report. As you can see it is easy to navigate trough our Reporting object model and find subreport textboxes containing aggregates and use their values in the master report. Additionally we represent optimal binding of Master/Detail reports. Please note how data is retrieved in the Details report by using Report parameter to update sql query parameter in the NeedDataSource handler.
Kind regards,
Hrisi
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0

Daniel
Top achievements
Rank 1
answered on 06 Aug 2008, 02:26 PM
Thanks you for providing this example Hrisi. Your help is appreciated.
Regards,
Daniel
Regards,
Daniel