none
Subtotals In Reporting Services

    Question

  • I have a report that I need to create subtotals in. Each category needs a subtotal before the grand total for instance

    [services covered] [Hours Earned]

    Parenting                1
    Parenting                3
    Parenting                4

    Subtotal 8 hours


    Cultural                     1
    Cultural                     1

    subtotal 2 hours


    Grand total 10 hours

    How do I do that in reporting services?? When I try to do it, it just gives me the grand total.
    Wednesday, June 10, 2009 7:23 PM

Answers

  • Hi,

     

    In this report, at least, you have to create one group. Suppose the group is grouped by the category, then, in the group footer, set the expression:

    =sum(Fields!Hours earned.Value)

    It will create the subtotals for each category.

     

    After that, in table footer set the same expression:

    =sum(Fields!Hours earned.Value)

    It will create the grant total for the whole report.

     

    Hope this helps.

    Raymond

    Tuesday, June 16, 2009 6:01 AM

All replies

  • If you group the report on "category", you will be able to create subtotals for each category in addition to the grand total.
    Wednesday, June 10, 2009 7:26 PM
  • hello shivani thank you for replying.  I have it on a table atm and so what you are saying is that I should first group the categories then and then do
     sum([Fields!Hours earned.Value]) under the Services Covered fields??  is that what you mean?? 

    Wednesday, June 10, 2009 8:13 PM
  • If you create a group within the report, SSRS automatically adds subtotals for the groups. Just make sure the "Show Subtotals" option is selected when you right click on the group row in design view (I'm assuming you are using Report Builder to create this report). Hope that helps.

    Wednesday, June 10, 2009 8:52 PM
  • No I am using Reporting Services not builder
    Wednesday, June 10, 2009 10:01 PM
  • Hi,

     

    In this report, at least, you have to create one group. Suppose the group is grouped by the category, then, in the group footer, set the expression:

    =sum(Fields!Hours earned.Value)

    It will create the subtotals for each category.

     

    After that, in table footer set the same expression:

    =sum(Fields!Hours earned.Value)

    It will create the grant total for the whole report.

     

    Hope this helps.

    Raymond

    Tuesday, June 16, 2009 6:01 AM