How to replace memo text at runtime

852 views
Skip to first unread message

Reinaldo

unread,
May 7, 2012, 7:51:14 PM5/7/12
to fastreport_f...@googlegroups.com
Hi everyone.  I noticed Spirin hasn't been present in this forum in a long while.  Perhaps someone else can help with this problem.  I want to replace the contents of a memo field before it prints.  I'm trying using an OnBeforePrint event like this:



procedure OnBeforePrintVersion(Sender: TfrxComponent);
begin

  PathTblVersion.Visible := TRUE;

  if <PathTbl."VERSION"> = 'ORGN' THEN
       PathTblVersion.Visible := FALSE ;

  if <PathTbl."VERSION"> = 'PRLM' THEN
       PathTblVersion.Text := 'PRELIMINARY'; 

  if <PathTbl."VERSION"> = 'CORR' THEN
       PathTblVersion.Text := 'CORRECTED';

  if <PathTbl."VERSION"> = 'ADDN' THEN
       PathTblVersion.Text := 'ADDENDUM'; 

end;

In short this code would print ADDENDUM whenever PathTbl."Version" field contains ADDN.  But it is printing ADDN instead.  Can someone help?

Thank you,



Reinaldo.

Jose Manuel Garcia del Valle

unread,
May 8, 2012, 3:23:39 AM5/8/12
to fastreport_f...@googlegroups.com

Try to put a new Text object instead of PathTbl."VERSION" and ..

 

If < PathTbl."VERSION"> = 'ADDN' THEN

       mEMO11.Text := 'ADDENDUM'

ELSE

       mEMO11.Text := < PathTbl."VERSION">;      

 

 

 

 


--
You received this message because you are subscribed to the Google Groups "FastReport for [x]Harbour, Alaska Xbase++, Visual FoxPro" group.
To view this discussion on the web visit https://groups.google.com/d/msg/fastreport_for_x_harbour/-/u6YhJc7N6vsJ.
To post to this group, send email to fastreport_f...@googlegroups.com.
To unsubscribe from this group, send email to fastreport_for_x_h...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/fastreport_for_x_harbour?hl=en.

Reply all
Reply to author
Forward
0 new messages