locked
How to add sub Total row under each group RRS feed

  • Question

  • Hi All,

    I have a requirement in which I want to give subtotal at the end of  a group in SSRS.

    It look like

    Group 1:

    count

    1

    2

    3

    Total Count = 6

    group 2

    count

    1

    2

    3

    4

    Total count = 10

     

    I am using lists as placeholder for all this values

    Please help me its urgent


    Thanks, A2H
    Tuesday, June 14, 2011 5:38 AM

Answers

  • Hi A2H1986,

    To work around the issue, I think you can insert a row for list, then display the Grand total in this row, steps are: just Right-click the handle of list row, and then select Insert Row->select Outside group-below. Then this row will only show in your last page to display the Grand total value.

    Thanks,
    Challen Fu


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Marked as answer by Challen Fu Friday, June 24, 2011 10:00 AM
    Tuesday, June 21, 2011 2:21 AM

All replies

  • Hi,

    If you are using Table / Matrix control, you just need to add group total. To do this right click on group -> add total.

    This will add total after group and total will shown after each group.

    Hope this help.

    Regards.

    • Proposed as answer by Rakesh M J Tuesday, June 14, 2011 10:49 AM
    Tuesday, June 14, 2011 9:53 AM
  • Hi,

    If you want to get some amount total field then follow the Asim's instructions but

    what I understood from your explanation if you want to get sum of number of records over the group then follow the below steps

    1- Add a column on left and name it SR#  put the expression like       =rownumber("groupname")      to generate the serial number over the group

    Now to get the commulative total number of records

    2- Add the new row out side the group

    3- And the text box expression  as         ="Total No of Records :"

    & count("Fields!sales_person.Value")

    hope it will help ..


    -------------------------------------------------------------------------------- Please mark my post as an answer if I helped you to resolve the issue or vote up if I helped you.Thanks. Regards and good Wishes, Maqbool.
    Tuesday, June 14, 2011 10:48 AM
  • HI All,

    First of all sorry for my wrong description.

    I dont want count ,count I just give as a dummy variable

    Basically I need this.

    I have a group in my report and i have pagebreak set on each groups.

    I have show subtotal on each groups and at the last of the page I want to show grand total.

    now my problem is grand total is coming in different page.because we have set page break in each groups.

     

     


    Thanks, A2H
    Tuesday, June 14, 2011 11:34 AM
  • If page breaks is set on the group as "Between Each Instance of a Group", you should get totals after the last group, on the same page as the last group.  Unless of course the last group fills the page, and then the totals will spill over to the next page.

    http://dataqueen.unlimitedviz.com


    Martina White
    Tuesday, June 14, 2011 12:48 PM
  • Hi Martina,

    I am unable to find out the option which u mentioned.

    I think its available in 2008 onwards.But I am using sql server 2005 version :(

     


    Thanks, A2H
    Tuesday, June 14, 2011 12:56 PM
  • For 2005, it sounds like you have it set to "Page Break After".  Try changing it to "Page Break Before".  This should allow your grand total to remain on the same page.
    Martina White
    • Proposed as answer by Challen Fu Wednesday, June 15, 2011 3:06 AM
    Tuesday, June 14, 2011 5:08 PM
  • Hi Martina,

    I have tried the option which u mentioned,it will keep the Grand total in same page.But when I export the data to pdf its creating a blank page at the start.

    EX: if I have 3 pages in pdf ,then first page is blank and then from second page onwards data is coming


    Thanks, A2H
    Wednesday, June 15, 2011 2:50 AM
  • Hi A2H,

    Just like Martina's advise, you can make use of Matrix control rather than list, then add a pagebreak to matrilx's group. Note: please select Pagebreak at start checkbox.

    Thanks,
    Challen Fu


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Wednesday, June 15, 2011 3:08 AM
  • Hi Challen,

    My problem is I have lots fields which has to placed in with different widths and sizes.For this matrix controls is not a good option.Thats Y I used list.Here in list u can have flexibility of placing it in any width.

     


    Thanks, A2H
    Wednesday, June 15, 2011 3:13 AM
  • Is there any way that we can stop page break for the last record in SSRS Report?
    Thanks, A2H
    Wednesday, June 15, 2011 3:15 AM
  • Hi A2H1986,

    To work around the issue, I think you can insert a row for list, then display the Grand total in this row, steps are: just Right-click the handle of list row, and then select Insert Row->select Outside group-below. Then this row will only show in your last page to display the Grand total value.

    Thanks,
    Challen Fu


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Marked as answer by Challen Fu Friday, June 24, 2011 10:00 AM
    Tuesday, June 21, 2011 2:21 AM