Jump to content
We've recently updated our Privacy Statement, available here ×

Condition statement


bgao16

Recommended Posts

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

you can use the java ternary conditional operatorù

 operand1 ? operand2 : operand3[/code]

so you can transform:

String a = ""

If ( cond1 )  Then
     a="value1"
Else If ( cond2) Then
     a="value2"
Els
e
     a="value3"

in (espressione editor of variable, textfield etc...)

cond1?"value1":(cond2?:"value2":"value3")

 

_________________________________________

if it works... give me KARMA points please!    : ) 
_________________________________________

listening:    Death in Vegas - Dirge

 

Link to comment
Share on other sites

  • 1 month later...

I'm have the same question, but I want to do a >= statement. i.e. I have a column that shows if the employee worked more or less than the average total hours.. this is what i tried but it wont let me use ">=" like in a case statement

WHEN $V{SUM} >= $V{total_average} THEN '+' ELSE '-'

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...