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

How to be sure that a band has been printed

edited March 2003 in General
I use the band AfterPrint or AfterGenerate events to set some variables.
However the events fire even if the band cannot be printed in the current
page. For example there is not enough space for the summary band to be
printed so a new page is generated. The AfterPrint/AfterGenerate events
however fire twice causing me problems.
So the general question is : Is it possible to know (which event) that a
band has actually been printed?
Thanks
Yannis

Comments

  • edited March 2003
    Yannis,

    Do not set variables in the AfterPrint or AfterGenerate events. These
    events fire frequently in order to ensure correct pagination through the
    report. Make sure you use the TppVariable.OnCalc event to set variables.

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited March 2003
    Thank you Nico,
    I just want to find out that a band has been actually printed after the
    AfterGenerate. The main reason not to be printed is that there is not enough
    space available. So I use band.OutOfSpace property in the AfterGenarate
    even.
    Do you think this is correct?
    Thanks again
    Yannis

  • edited March 2003
    Yannis,

    Since you are not performing any calculations in a one to one relationship
    with the records, this is the correct approach to take. Using the
    Band.OutOfSpace property in the AfterGenerate event should give you the
    correct information.

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.