Hiding Variables based on there values
?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
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
This discussion has been closed.
Comments
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
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
certain
inside
then
using
variables
this seems like a basic questions
Kind Regards
Dave
--- posted by geoForum on http://delphi.newswhat.com
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
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
something
$1@mail....