You are reading help file online using chmlib.com
|
Rave Reports Visual Designer Example OnBeforePrint . |
Top Previous Next |
You can use events to control the visibility of components. You do this by putting a script that sets the "visible" property in a parent of the component you want to control (or in another component). Do not put a script that changes visibility in the same component you want to control as it will run until it is "false" but will not run after that as the event "is no longer visible". The first example shows a header band event that controls the visibility of another band.
{ Event for HeaderBand.OnBeforePrint } function HeaderBand_OnBeforePrint(Self: TRaveBand); begin if Frac(DvInventoryLastEdit.AsFloat) < 0.25 then BandRowFooter.visible := True; elseif Frac(DvInventoryLastEdit.AsFloat) > 0.75 then BandRowFooter.visible := True; else BandRowFooter.visible := False; end if; end OnBeforePrint;
This band event changes the visibility of components within the band.
{ Event for DetailBand.OnBeforePrint } function DetailBand_OnBeforePrint(Self: TRaveDataBand); begin if UpperCase(BioLifeDvCategory.AsString) = 'SHARK' then dtCM.visible := False; BitmapFish.visible := False; else dtCM.visible := True; BitmapFish.visible := True; end if; end OnBeforePrint;
|
You are reading help file online using chmlib.com
|