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

Help on group totals

edited June 2003 in End User
RB7.02 D6 EndUser DADE

I have a report with three grouping levels. Each level has a total
line currently in their respective headers. I need to re-format the
report so that all of the totals for groups 2 and 3 are printed in the
header for the top group 1.

How can I do this?

That is it needs to be something like this:

G1 - United States
G2 - CA 44
G3 Blue 17
G3 Green 33
G2 - WA 7
G3 Blue 22
G3 Red 11
G2 - IL
G3 Orange 7
G3 Yellow 6

Detail United States CA Blue Left 12
Detail United States CA Blue Right 5
Detail United States CA Green Right 33
Detail United States WA Blue Right 13
...


G1 - Canada
G2 - ON 17
...


Thanks,
Rick Matthews
Dartek Systems Inc.

Comments

  • edited June 2003
    You'll have to build a list in the first pass of the report. Then store the
    totals in a list and then in the second pass, print those values in the
    appropriate group header. Create a class that stores the outgroup's
    breaking (key) value and then store the total when the inner group finishes.
    Then store this object in a TList. That way you'll know which group the
    total values can be associated with in the second pass as the outer group
    header prints, since you can compare the current pipeline value to what is
    in your list. The list should alread be ordered automatically because it was
    populated in the first pass so that is taken care of naturally.


    Cheers,

    Jim Bennett
    Digital Metaphors


  • edited June 2003
    Thanks Jim I did think that I couldn't do it as an end user out of the
    box. I will look at your coding solution.

    Thanks for the help.

    Cheers,

This discussion has been closed.