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

Sequence of events

edited February 2002 in General
I have a report. I have a calculated variable and some code in the
onbeforeprint detail event. The order that they fire seems to change as the
report runs

for example.

variable for rec 1-> detail for rec 1-> detail for rec 2 -> variable for rec
2->detail for record3 -> variable for record 3.

Surely there should be some consistency so that the variable either always
fires before the onbeforedetail print or always after?

Strikes me that this is a bug. I am using the latest RB6.03 Enterprise with
D5 update pack 1 on W2k Pro SP2.

Regards Tony

Comments

  • edited February 2002
    The DetailBand's BeforePrint may fire multiple times for each record, where
    the OnCalc will fire only once. This may be the reason that you're seeing
    the BeforePrint fire before and after. Run the event tracker demos in the
    main reports demo project to see them in action. You'll notice that when a
    KeepTogether page break occurs, you'll get an extra BeforePrint, as the band
    had to regenerate because it couldn't fit on the previous page. The engine
    triggers the OnCalc events, when it traverses to the next record.


    Cheers,

    Jim Bennett
    Digital Metaphors


This discussion has been closed.