Page 1 of 1

Variable initialization by expression doesn't work

Posted: Wed Feb 29, 2012 11:25 am
by Norbi
Hello,

I want to initialize my variable by expression, eg. {Log(2)} or {"apple".ToUpperCase()}, it doesn't work. In the Preview the value of the variable is not evaluated, it shows the expression string. I've tried to use this variable in a SQL query, but it also failed.
I've tried not to use {}, but cannot help.

Is it my fault?

Thanks.

Variable initialization by expression doesn't work

Posted: Thu Mar 01, 2012 6:22 am
by HighAley
Hello.
Norbi wrote:I want to initialize my variable by expression, eg. {Log(2)} or {"apple".ToUpperCase()}, it doesn't work. In the Preview the value of the variable is not evaluated, it shows the expression string. I've tried to use this variable in a SQL query, but it also failed.
I've tried not to use {}, but cannot help.

Is it my fault?
Please, read the Stimulsoft Reports.Fx Universal User Manual. There you could find description of expressions that you could use. For example, {"apple".ToUpper()}.
Which version do you use? The {Log(2)} expression works on the last prerelease build.

Thank you.

Variable initialization by expression doesn't work

Posted: Mon Mar 12, 2012 12:27 pm
by Norbi
Hello,

My version: 2011.3.1200 from 2011.12.01
Flash Player: 11.1.102 for Windows

I've read the Universal User Manual, i've found the {"Test".ToUpper()} example, but in the function list there are a ToUpperCase function. Is this an incosistency?

But the main problem: if I use this expression in the main report area, it works, but if I try to use it in a variable initialized by this expression, and put this variable into the main report area, it doesn't work.

How can I make it work?

Thanks!

Variable initialization by expression doesn't work

Posted: Tue Mar 13, 2012 4:28 am
by Alex K.
Hello,
I've read the Universal User Manual, i've found the {"Test".ToUpper()} example, but in the function list there are a ToUpperCase function. Is this an incosistency?
ToUpper - standard method of the String type, for example {"Test".ToUpper()}
ToUpperCase - our function, for example {ToUpperCase("Test")}
if I try to use it in a variable initialized by this expression, and put this variable into the main report area, it doesn't work.
Please check the last prereleas build.
Also you must use expression with out "{"
for example:
"apple".ToUpper()

Thank you.