Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

Summing group header value in the footer

edited January 2005 in General
Hi,
I have built a report for a group of spare parts.
Each part has an age value.
I need to do 2 things.
1) Count the number of times a part is removed from an assembly. - Fine.
2) Sum the ages of each partnumber. ie: I have 5 of a certain part (under
five different serial numbers). I need to add together the five ages.

I have the report grouped by part number and by serial number. In the SN
group header I have the age for each SN.
In the PN group footer I want to sum all the SN ages.
But the PROBLEM is that it counts up an age value for each occurance of a
SN (ie each time it is removed).
How can I isolate the age values and sum them? If you need more info,
please ask. Im still learning RB.

Thanks
Red

Comments

  • edited January 2005
    Hi Red,

    Instead of using a DBCalc (which is what I assume you are using), try using
    two TppVariables (one in the detail band, and one in the group footer).
    Then inside the OnCalc event of the first TppVariable, you can update the
    value of the second Variable (located in the group footer). This way, you
    will have complete control over what gets added to the sum. Then you can
    set the TppVariable in the detail band to Visible := False;

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.