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

Hiding Variables based on there values

edited September 2006 in General
?Hi guys. Is there away to hide or unhide variables based on the value
that they contain. I have a report that lists booking no's i then have
two variables. One that states a yes or no if a sales invoice has been
raised and the other to say yes or no if a purchase invoice has been
raised. Is there away to hide the whole record if both the variables
return yes yes or no no. Hope this makes sense



--- posted by geoForum on http://delphi.newswhat.com

Comments

  • edited September 2006
    Hi Dave,

    If you would like to hide a complete record (or detail band) if a certain
    condition exists, the best way to go about it is to place a TppRegion inside
    the detail band with its ParentWidth and ParentHeight set to True and then
    to add all the components (DBTexts, etc.) to the region. Then perhaps using
    the DetailBand.BeforePrint event, you can check the value of the variables
    and set the visibility of the region based on that value.

    --
    Regards,

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

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited September 2006
    >Hi Dave,
    certain
    inside
    then
    using
    variables
    this seems like a basic questions

    Kind Regards
    Dave



    --- posted by geoForum on http://delphi.newswhat.com
  • edited September 2006
    Hi Dave,

    You can set the visibility of any object on a report using the Visible
    property. For instance, if you would like to toggle the visibility of a
    region based on the value of a data field, your code would look something
    like this...

    if Report.DataPipeline['MyField'] <= 0 then
    MyRegion.Visible := False
    else
    MyRegion.Visibile := True;

    --
    Regards,

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

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited September 2006
    >Hi Dave,
    something
    $1@mail....
This discussion has been closed.