Variable initialization by expression doesn't work

Stimulsoft Reports.PHP discussion
Post Reply
Norbi
Posts: 11
Joined: Wed Feb 29, 2012 10:16 am

Variable initialization by expression doesn't work

Post 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.
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Variable initialization by expression doesn't work

Post 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.
Norbi
Posts: 11
Joined: Wed Feb 29, 2012 10:16 am

Variable initialization by expression doesn't work

Post 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!
Attachments
1711.Expression3.JPG
1711.Expression3.JPG (27.83 KiB) Viewed 3166 times
1710.Expression2.JPG
1710.Expression2.JPG (4.67 KiB) Viewed 3166 times
1709.Expression1.JPG
1709.Expression1.JPG (7.63 KiB) Viewed 3168 times
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Variable initialization by expression doesn't work

Post 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.
Post Reply