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

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.