Get text value from object

edited 2:09AM in FreeReport
I have a Memo object without Text but with a small script. After run the preview I want extract the value of Memo (calculate by the script).

I use this code:

var
t: TfrMemoView;
begin
t := TfrMemoView(frReport1.FindObject('Memo5'));
Memo1.Lines.Add(t.Text);
end;

However on preview I see "1000000" (as text of Memo5) on Memo1 (a simple TMemo component) I see black string.

On my small example the script of Memo5 is "Text := [Fattura.Spese]*3+1000000" when [Fattura.Spese] = 0.

Can you help me?

I don't understand why my code works only if I use the Memo25.Memo property but not with Memo25.Script property.

Leave a Comment