Page 1 of 1

Totaling a static value in a group footer

Posted: Thu Feb 04, 2010 4:57 pm
by johnham
I am having a problem Totaling a set of totals. I have a report structured the following way:

Code: Select all

Group Header
    Group Header
        Detail - Hidden Field has Static Value
    Group Footer with Static Value and Sums from Detail
Group Footer that should Total the Static Value from the first group

Now to explain this I have a value that occurs in every record of my detail (a list of inventory items). It's the number of items in a category that the item is part of. It occurs in every line of my detail and is the same for the group because the group is by item category. To keep with proper form, in the group footer I have summarized this number using Max(). The other columns (Cost of Items, etc) are totaled in that same group footer. My detail is hidden because I only care about the totals for each category. However, then I need to have a grand total in the outer-most group footer. I have to grand total the Cost of items which is easy. However the number that stays the same in the detail is getting totaled as if I were totaling the detail. I would like to Total the number that is in the First Group Footer (the Max(NumberofItems)).

I guess I need something like SUM(MAX(numberofitems)) but that doesn't work.

Is there something I can do to total the numbers as they appear in the inner group footer?


Totaling a static value in a group footer

Posted: Fri Feb 05, 2010 1:56 pm
by Edward
Hi John,

It seems that only one thing you can do in this case - is to use variables for calculation of totals in each groupfooter.

Just increase that variable in each GroupHeader. As values are repeated, so the first line will contain the result you need.

Thank you.