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

Supress Label if no data

edited July 2004 in General
Hello,

I would like to know if there is a way to prevent the report from printing a
label if the corresponding data field is blank or zero?

I tried setting up the following on the OnPrint are of the label, but it is
not working:

begin

if DBCalc3=0 then

Label14.visible :=false;

end;

The label and DBCalc3 are on a group footer and DBCalc3 is the sum of detail
records.

Thanks in advance.

Mark G.

Comments

  • edited July 2004
    You can try the follwing on the Label14.OnGetText event
    if DBCalc3.Value = 0 then
    Text := ''; // Text is a parameter of the event that is already filled
    with the string that will appear in the label, so you should only clear it
    when needed.


    Best regards,

    Nuno Fonseca


This discussion has been closed.