Reputation: 21
I have a hard time getting memo value from fastreport to delphi. I have a memo in fastreport with computed value and i want to get this value and send it to my delphi edit text.
I tried this code but the result is only text not a value
txtValue.text := TfrxMemoView(frxReport1.FindComponent('Memo3')).Text;
Upvotes: 0
Views: 5412
Reputation: 14928
You can do as
begin
// Get Text property
txtValue.text := TfrxMemoView(frxReport1.FindComponent('Memo3')).Text;
// Get Value property
txtValue.text := TfrxMemoView(frxReport1.FindComponent('Memo3')).Value;
end;
If you want to concatenate two strings from Text
and Value
properties then
procedure TForm1.Button1Click(Sender: TObject);
begin
// Set the Text property
TfrxMemoView(frxReport1.FindObject('Memo3')).Text:= 'MyFirstString';
// Set the Value property
TfrxMemoView(frxReport1.FindObject('Memo3')).Value:= 'MySecondString';
// Concatenate the strings and assign the result to the TEdit.Text property
txtValue.Text:= Concat(TfrxMemoView(frxReport1.FindObject('Memo3')).Text,
' ',
TfrxMemoView(frxReport1.FindObject('Memo3')).Value
);
end;
Upvotes: 1