Wednesday, March 21, 2012

group subtotal and grand total

how to add group subtotal and grand total in report? i try to add formula Sum(Field!Net_Weight.Value) in group footer and unable repeat footer on each page, it return same total on every pages. I hope to get subtotal on each page by group. the expected result would be like this:

Page1




1.Group 1

Date D/no Net Weight 6/1/2007 A00000100 10.45 6/1/2007 A00000101 10.95 6/1/2007 A00000102 11.45 6/1/2007 A00000103 11.95 6/1/2007 A00000104 12.45 6/1/2007 A00000105 12.95
Subtotal 70.2


Page 2




Date D/no Net Weight 6/1/2007 A00000100 20.15 6/1/2007 A00000101 20.25 6/1/2007 A00000102 20.35 6/1/2007 A00000103 20.45 6/1/2007 A00000104 12.45 6/1/2007 A00000105 12.95
Subtotal 106.6



Grand Total= 176.8





2.Group 2

Date D/no Net Weight 6/1/2007 A00000100 10.45 6/1/2007 A00000101 10.95 6/1/2007 A00000102 11.45 6/1/2007 A00000103 11.95 6/1/2007 A00000104 12 6/1/2007 A00000105 12.95
Subtotal 69.75


anybody know how to do it?

Make sure you are in the Group Footer

FOR Subtotal:

="Display Subtotal Text" & "" & Fields!txtColumn.Value

=Sum(Fields!Balance.Value, "

=Sum(Fields!Balance.Value, "grpNameofGroup")

")

FOR Grandtotal:

=Sum(Fields!Balance.Value)

|||why the subtotal have many equal sigh? shoulnt be just one?
I put sum(Field!Balance.value,"Grpname") in group folder, it return same subtotall one each page in same group category, can the subtotal just sum up the total on textfield withinn the same group in a page?

|||

From the question that you have posted and the example that you have given I think it can be achieved by having 2 groups in 2 different group header. In the detail section put the value of the 2 nd group that you want to display. and at the 2 group footer just put the expression Sum(Field!Net_Weight.Value). For every group you have to set 'Page Break at End'.

I think it will work.

No comments:

Post a Comment