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

Multiple Variable Movable Groups ?

edited August 2002 in General
Client would like to do this:

Have 6 possible group-levels. They can choose one, two, up to six.

They can also order them how they like.

And just to make it more fun, the nature of the data (such as averages)
means that the group totals can't be derived from the report but must be
recalculated from the source data for each group.

In the old procedural days, I would put the data into the right order
for the groups, and then process in loops, outputting records and group
bands as needed.

Any idea how to do this in RB?

Comments

  • edited August 2002
    Create six groups in the report - set to the most likely order. Order the
    data based on the user selection. Loop through the Report.Groups array
    property, setting Group.BreakName to the appropriate FieldName. Access the
    DBCalcs in the Group.FooterBand and set the DataField property. For any
    groups which are not needed, set the BreakType to btCustom, and the
    BreakName to a Label component in the report that never changes value. Set
    the Group.HeaderBand and Group.FooterBand Visible property to False for
    these unneeded inner groups (if, for example, they only select three
    groups.)

    This technique focuses on configuring existing groups, which is generally
    easier than creating new groups - of course, you can do that as well. Simply
    start with no groups in the report and then create the group and associated
    group header and footer bands based on the user selection...

    --
    Cheers,

    Tom Ollar
    Digital Metaphors Corporation
This discussion has been closed.