change text in memo before print

Delphi XE2.
I have a Memo field in a report named frxReportPermits

I need to change the value of the text in Memo2.

How do I access the Memo2 value in the onbeforeprint ?

If I try frxReportPermits.Memo2.Text this does not work.


Cheers


SteveW

Comments

  • gpigpi
    edited 5:58PM
    Try

    TfrxMemoView(frxReportPermits.FindObject('Memo2')).Memo.Text
  • edited 5:58PM
    procedure TReports.frxReport1BeforePrint(Sender: TfrxReportComponent);
    var
    memo_1 : TfrxMemoView ;
    begin
    memo_1 := frxReport1.FindObject('memo1') as TfrxMemoView;
    memo_1.Text:='mytext';

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.