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

Suppressing group footer

edited February 2003 in General
Hi all,

I have a report with several detail records for each one of my
customers...each detail record is a sale/transaction. There is alot more to
this report, so I won't go into a whole description, but basically, I do
alot of calculations, and come up with totals which I print in the footer
band for each customer.

The problem is, depending on which criteria my users select, I need to
filter out some of those customers. I have previously been told to use the
pipelines' OnRecordPositionChange, and skip the records which do not meet
the criteria...this has worked well for me in the past when I have one
record for each group, but I am having a problem with the multiple records.
The records are ordered by a unique id...I have put logic in to check if it
is to be skipped, continue skipping until it reaches the next unique id,
check if it is to be skipped, etc.

The problem is that I have totals that need to be reset when I get to a new
person, plus, every time I reach a new person, that person prints twice. It
seems like it gets to the last skipped person...prints the footer record for
that person, but using the next persons info, then goes on to the next
person.

Any suggestions how I can suppress that footer band from printing, and then
where I can turn it back on for the next person? Also, where is the best
place to reset my variables and such?

Thanks,
Stacey

Comments

  • edited February 2003
    Reset the variable with the GroupEnd/Start timing from the variable's Timing
    dialog and set the ResetGroup setting in the dialog as well.

    Suppress the group footer in its BeforePrint event, by toggling its Visible
    property. To determine whether or not to show it, use another variable to
    determine the difference between the number of skipped records in a group
    and the number of records total for a group. If you skipped them all, then
    hide the footer, otherwise, show it. Use the group object's events to
    determine when a group breaks to initialize your variable. The
    TppGroup.AfterGroupBreak event would work to tell you when a group changes.

    Cheers,

    Jim Bennett
    Digital Metaphors


This discussion has been closed.