Sender as TfrxMemoView - doesn't work in script

edited 8:24PM in FastReport 4.0
Hello,

My problem is that this works...

procedure ProfileOnBeforePrint(Sender: TfrxComponent);
begin
Memo3.Text := 'something';
end;


But this doesn't:

procedure ProfileOnBeforePrint(Sender: TfrxComponent);
begin
(Sender as TfrxMemoView).Text:= 'something';
end;

The error is "; expected"

Why can't I refer as (Sender as TfrxMemoView) in the script like in Delphi? What is the Sender parameter for if I can't use it?

Comments

  • gpigpi
    edited 8:24PM
    Use
    TfrxMemoView(Sender).Text:= 'something';
  • edited 8:24PM
    gpi wrote: »
    Use
    TfrxMemoView(Sender).Text:= 'something';

    Thank you, it works perfectly >

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.