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

Struggling to create grouping and summaries in a table

7 Answers 1387 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Karl
Top achievements
Rank 1
Karl asked on 25 Sep 2019, 06:08 PM

Hi,

I'm new to Telerik reporting and using the Standalone Designer.

My report is driven by data that contains name, address and a collection of fund data.

I have a table with this data:  Fund Name, Date, Amount

I need to display the data grouped by Fund Name, and show summary row for each Fund Name, and a Grand Total for all funds.

Parking Lot Fund

1/1/2019                   $50.00

1/2/2019                   $50.00

                       Total $100.00

Building Fund
1/1/2019                   $50.00
1/2/2019                   $50.00
                      Total  $100.00

            Grand Total  $200.00

I have a table control in my detail section, have spent a few hours trying to do the above.  

How can I add the grouping and summary for my table.

Thank you!!!

 

Karl

 

7 Answers, 1 is accepted

Sort by
0
Silviya
Telerik team
answered on 30 Sep 2019, 09:10 AM

Hi Karl,

The provided structure can be easily achieved with the help of Table data item and adding one parent group for the Fund names which contains a footer row for the totals and one bottom row outside the group for the grand total. I created a sample demo and also a video with the steps to recreate it from scratch. Please check the video here: https://www.screencast.com/t/vrmwufiHVfH. Please note that Flash Player is required for previewing the video.

I hope this satisfies the requirement. Let us know if you need further assistance.

Best Regards,
Silviya
Progress Telerik

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Karl
Top achievements
Rank 1
answered on 30 Sep 2019, 11:41 AM

Silviya,

Thank you very much for a detailed reponse and solution.

Suggestion:  Go a little slower, pause between actions.  I wish the flash player allowed users to slow the playback down like YouTube does but it does not.

Thank you again, have a great day,

Karl

0
Karl
Top achievements
Rank 1
answered on 30 Sep 2019, 05:07 PM

Silviya,

How can I get the Fund Name to appear above the Date column as in the attached image and in the original questions.  

Sorrry if I was not clear.  I've spent an hour trying to get the Fund Name to appear above the date, but can't get it working.

Thank you!

Karl

0
Todor
Telerik team
answered on 03 Oct 2019, 12:24 PM

Hello Karl,

From the screenshot, I assume that you need to display a Table for each fund. You may use Report Groups grouped by Fund Name. Here are the necessary steps:

  • Set the DataSource to the Report;
  • Add Report Group and place a Table that would display the detail data for each fund in the Group Header. This is necessary, as we will reuse the Report data source. Thus, if the Table is in the detail section it will be multiplicated as each detail section is rendered multiple times, equal to the number of records within the corresponding data item DataSource;
  • Table DataSource should be set with Bindings to the data source of its parent - check How to use the ReportItem.DataObject property in expressions;
  • Place a TextBox with the Fund Name above the Table in the Group Header. This TextBox is outside the Table and that is why it is necessary for the Table and the Report (i.e. also its Groups) to have the same data source.

I have demonstrated the approach in the attached sample.

Regards,


Todor
Progress Telerik

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Karl
Top achievements
Rank 1
answered on 03 Oct 2019, 04:42 PM

Great example.  One item that still needs to be addressed, what about the Grand Totals?  With this change, how can I show my grand totals. 

I tried adding a TextBox in the group footer, changed the footer to visible, but the Sum function is only returning the last Fund's totals.

What do I need to do to get the grand total of all Funds?

 

 

0
Karl
Top achievements
Rank 1
answered on 03 Oct 2019, 06:46 PM

I've posted a Support Request since multiple suggestions here didn't answer all the questions.

Thanks for posting your response.

Karl

0
Neli
Telerik team
answered on 04 Oct 2019, 11:13 AM

Hi Karl,

To calculate the grand total of the fields, you need to reveal the Report Footer (right-click outside of the report -> Report Footer). Then add the expression in it:

= "Grand Total:  " + Sum(Fields.Amount)

Basically, the report footer is used to print report totals or other summary information for the entire report. Similar to the Report Header section, you should always use aggregate functions for the data-bound items that are calculated for the entire report data. For more information, refer to the Report Structure article.

Regards,
Neli
Progress Telerik

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
General Discussions
Asked by
Karl
Top achievements
Rank 1
Answers by
Silviya
Telerik team
Karl
Top achievements
Rank 1
Todor
Telerik team
Neli
Telerik team
Share this question
or