Determining if a Group Header has already printed
I need to know how to determine if a Group Header has already printed on
another page. On the BeforeGenerate event of a Group Header I do some
calculations that must only be done once (adding a value to a running
total). I have the Group Header setup to reprint if the Group goes across
multiple pages. The problem that I am having is that the BeforeGenerate
fires every time the Group Header actually prints (which is fine) so I am
double counting some values in teh running total. I need to be able to
determine if this is the first time the Group Header is printing or whether
it has printed before so that I can add the value to the running total only
once.
Thanks,
Scott Rowat.
another page. On the BeforeGenerate event of a Group Header I do some
calculations that must only be done once (adding a value to a running
total). I have the Group Header setup to reprint if the Group goes across
multiple pages. The problem that I am having is that the BeforeGenerate
fires every time the Group Header actually prints (which is fine) so I am
double counting some values in teh running total. I need to be able to
determine if this is the first time the Group Header is printing or whether
it has printed before so that I can add the value to the running total only
once.
Thanks,
Scott Rowat.
This discussion has been closed.
Comments
BeforePrint check if the variable is false, if it is, set it to true and
perform your calculations, otherwise do nothing. Reset the variable in the
GroupHeader's Before/AfterPrint back to false. This way you'll ensure that
if the group spills onto another page you'll only be performing calculation
once per group.
--
Cheers,
Alexander Kramnik
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com
calculation, and set its timing to calculate based on a group start instead
of on the data pipeline traversal. The timing is accessible by right
clicking over the variable component and in the popup menu there is
Timing... option which will launch the timing dialog where you can set this
up.
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com