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

BeforeGenerate firing 2X for the same record?

edited January 2007 in General
Hi,

It appears that while traversing the data the detail band's BeforeGenerate
(and BeforePrint) event fires twice for the first record on a subsequent
page. I am using RP 9.03 and D7.

I don't know if it matters but I have one group on the report. I have used
groups many times before without experiencing this issue but I can't seem to
figure out why this one report is behaving this way.

Any ideas?

Shane

Comments

  • edited January 2007
    Hi Shane,

    This is functioning as designed. The report engine will continue to
    generate details until space runs out on a page. Then, if the last detail
    band cannot fit, it will regenerate on the next page essentially firing the
    BeforeGenerate twice. If you are making a calculation of some sort, be sure
    you are using the OnCalc event of a TppVariable. This is the only event
    that is designed to only fire once per record traversal. Otherwise you will
    need to manually check for the event firing more than once for each band in
    code.

    --
    Regards,

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

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited January 2007
    Ok,
    Thanks for the quick reply Nico.

This discussion has been closed.