Hide a text memo field if the data result is empty

Hi, how do I set to hide a text memo field if the data result is empty? - For example If I want to offer a price discount of 20% the memo should appear as "Discount: 20%" but if at my data I enter "0" or I leave it empty then the entire discount memo should return invisible and disappear from the report. (I don't want when not offering a discount for a client it should be displayed...)

(I'm not so well experienced with FR, would appreciate detailed guidance.)

I tried the coding below but it didn't work:

procedure ReportSummary1OnBeforePrint(Sender: TfrxComponent);

begin

  if VarToStr(<EstData."Discount">) = '' then

  begin

   Memo20.Visible := False;  

  end

 else

  begin          

   Memo20.Visible := True;    

  end; 

end;


Appreciate your help! Thank you!

Leave a Comment