Reading tfrxMemoView.Value in runtime
I need to change the overlay image file during runtime, based on a language code in the customer's data.
To do this I have hooked an ' OnbeforePrint' event on the report.
The problem is that when this event occurs, I can access the Memoview with findcomponent, but i cannot read the value that is inside. All i get is the memo's value from design-time (meaning the datasetname and the datafieldname).
I have tried (from tfrxmemoview) the properties Value, Text, Memo.Text, GetComponentText, and ToString, but none of these give me the value (code) of the memo. I can see it in the report when it is printed??
Any clues?
To do this I have hooked an ' OnbeforePrint' event on the report.
The problem is that when this event occurs, I can access the Memoview with findcomponent, but i cannot read the value that is inside. All i get is the memo's value from design-time (meaning the datasetname and the datafieldname).
I have tried (from tfrxmemoview) the properties Value, Text, Memo.Text, GetComponentText, and ToString, but none of these give me the value (code) of the memo. I can see it in the report when it is printed??
Any clues?
Comments
StrVar := Get(MemoView1.text);
But keep in might that you probably need to trim the memoview.text value, see this post:
http://www.fast-report.com/en/forum/index....amp;#entry22017
If it doesn't work initially, try putting the value between quotes before calling get(), and play with the brackets as well,
like:
get('[Data_Threat."Score"]')
get('''[Data_Threat."Score"]''')
get('Data_Threat."Score"')
See chapter 6.12 in the users manual.