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

OnPrint Event

edited May 2008 in General
How do I use the onprint event to stop the line printing when a condition is
true.

Thanks
BruceNich

Comments

  • edited May 2008
    Hi Bruce,

    The OnPrint event of a component can be used to toggle it's visibility using
    the Visible property. If you need to hide an entire band, try setting the
    visibility of the band in the BeforePrint event.

    if [Condition] then
    MyComponent.Visible := False
    else
    MyComponent.Visible := True;

    or

    MyComponent.Visible := not([Condition])

    --
    Regards,

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

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited May 2008
    Thank you Nico
    Your advice fixed my problem - I used the BeforePrint event to prevent a
    line from printing. Too easy

    Thanks
    Bruce

This discussion has been closed.