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

Hiding Checkboxes

edited September 2003 in General
Hi there,

I have a report with some checkboxes and I want to stop the checkboxes from
printing if they are not checked. I have found the onDrawCommandCreate
event and am wondering if this is the place but are not sure what the code
would be. Thanks.

Richard

Comments

  • edited September 2003
    I think that you could do it that way, but it may depend on how you are
    using it. We would (instead) set Visible to False if unckecked in
    DetailBandBeforePrint (or groupHeader/Footer, etc).BeforePrint.

  • edited September 2003
    Hi Richard,

    If these checkboxes are in the Detail Band, you should use the
    DetailBand.OnBeforePrint event to check if the checkbox is checked or not
    and set it's visibility to False if needed. If the checkboxes are in
    another band, it is still a good idea to use that band's OnBeforePrint event
    to toggle the visibility of the checkboxes. The OnDrawCommandCreate will
    fire too late to get the results you are after.

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited September 2003
    Hi,

    Thanks for this. I have made the change and it is working fine.

    Richard

This discussion has been closed.