Variable in conditions

Stimulsoft Reports.JS discussion
Post Reply
Kline
Posts: 35
Joined: Thu Nov 29, 2018 8:22 am

Variable in conditions

Post by Kline »

Hi,
I need to use a variable present in my dictionary to set a condition.
I have a string variable named "livello", what is the correct way to write the condition?
I tried this way but it doesn't work
conditions.jpg
conditions.jpg (101.34 KiB) Viewed 2414 times
Thank you
Giovanni
Lech Kulikowski
Posts: 6244
Joined: Tue Mar 20, 2018 5:34 am

Re: Variable in conditions

Post by Lech Kulikowski »

Hello,

What do you mean with "stringvalue > 0" expression - length or value or something else of that string?

Thank you.
Kline
Posts: 35
Joined: Thu Nov 29, 2018 8:22 am

Re: Variable in conditions

Post by Kline »

Sorry, I was not precise. "livello" is a "decimal" type variable. I mean value of "livello" is bigger than 0.

Thank you
Lech Kulikowski
Posts: 6244
Joined: Tue Mar 20, 2018 5:34 am

Re: Variable in conditions

Post by Lech Kulikowski »

Hello,

Your condition is not correct:
livello = 0 AND livello > 0

Please try to remove first and in the second use:
livello >= 0

Thank you.
Kline
Posts: 35
Joined: Thu Nov 29, 2018 8:22 am

Re: Variable in conditions

Post by Kline »

Hello,
I removed the first condition and it works if I "use livello >= 0" but not if I use "livello > 0", the value of the variable "livello" is 4.

I tried with other conditions and I found there are problems when I add a second level.

Thank you
Lech Kulikowski
Posts: 6244
Joined: Tue Mar 20, 2018 5:34 am

Re: Variable in conditions

Post by Lech Kulikowski »

Hello,

Please send us a sample report with test data which reproduces the issue for analysis.

Thank you.
Kline
Posts: 35
Joined: Thu Nov 29, 2018 8:22 am

Re: Variable in conditions

Post by Kline »

Hello,
I solved using both the necessary conditions in an expression joined with "&&"

thank you
Lech Kulikowski
Posts: 6244
Joined: Tue Mar 20, 2018 5:34 am

Re: Variable in conditions

Post by Lech Kulikowski »

Hello

Ok.
Please let us know if you need any additional help.

Thank you.
Post Reply