copy of a variable's value
Hi
I've created a variable's value "var1" ongetvalue evenement but when i want to do a copy([var1],1,3) in order to have the first three letter of my variable, it posts me "[va".
WHY ?
Thanks
I've created a variable's value "var1" ongetvalue evenement but when i want to do a copy([var1],1,3) in order to have the first three letter of my variable, it posts me "[va".
WHY ?
Thanks
Comments
you probably included a [ within the string.
This is my code :
In my report, the variable's value is in a TFrxmemo.
But when i want to do a copy(Memo3.text,1,6), it shows me "[var1]" instead of "coucou".
I've tryed "copy([var1],1,6)" but an error message appears "Undeclared identifier <cell1>". I've also tested without [] but it's similar.
you want the value of the variableand you must watch 2 things,
since you are retrieving the value of the var in the ongetvalue event you can't process it until after it retrieves a value. so write your expression in the memo this way [Copy([var1],1,3)]
"Undeclared identifier var1".
My variable is into a Memo in a MasterData and the other Memo where i want to do a copy of my variable is in a GroupFooter, is it important ?
your onget value code is bad
should be
if AnsiComparetext(parName, 'var1') = 0 then
parValue := 'coucou';
I've tested on Windows NT4 and an error appears but with Windows XP, I've not got error. Why ?
the answer i gave you was for fr2.53.
in version 3
you must use the get method with the variable
[copy(get('var1'),1,3)]