Struggling to create grouping and summaries in a table

8 posts, 0 answers
  1. Karl
    Karl avatar
    20 posts
    Member since:
    Aug 2019

    Posted 25 Sep Link to this post

    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

     

  2. Silviya
    Admin
    Silviya avatar
    414 posts

    Posted 30 Sep Link to this post

    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
  3. Karl
    Karl avatar
    20 posts
    Member since:
    Aug 2019

    Posted 30 Sep in reply to Silviya Link to this post

    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

  4. Karl
    Karl avatar
    20 posts
    Member since:
    Aug 2019

    Posted 30 Sep Link to this post

    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

  5. Todor
    Admin
    Todor avatar
    397 posts

    Posted 03 Oct Link to this post

    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
  6. Karl
    Karl avatar
    20 posts
    Member since:
    Aug 2019

    Posted 03 Oct in reply to Todor Link to this post

    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?

     

     

  7. Karl
    Karl avatar
    20 posts
    Member since:
    Aug 2019

    Posted 03 Oct in reply to Todor Link to this post

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

    Thanks for posting your response.

    Karl

  8. Neli
    Admin
    Neli avatar
    190 posts

    Posted 04 Oct Link to this post

    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
Back to Top