I'm at a loss with lazReport.
What I want to achieve is to print or not to print certain fields and lines in a report depending on the content of some other field.
All those fields and lines are in the Headerband.
I tried to solve this by using scripting on a field in the report, but all I have achieved so far is a dump in one case or no visible effect at all.
Unfortunately the documentation with lazReport is not a big help for me in this case.
First scripting attempt (hiding by printing white on white:
if Memo2.Text = ''
then begin
line1.FontColor := clWhite;
memo3.FontColor := clWhite;
end
else begin
line1.FontColor := clBlack;
memo3.FontColor := clBlack;
end;
Second attempt (trying to hide the fields and lines):
if Memo2.Text = ''
then begin
line1.Visible := false;
memo3.Visible := false;
end
else begin
line1.Visible := true;
memo3.Visible := true;
end;
What am I missing or am I on the wrong track all together?
Can anyone give me some hints for a working solution?