bgao16 Posted June 22, 2010 Share Posted June 22, 2010 Hi,Does iReport support regular condition statements in Expression Editor such as If ( ) Then Else If ( ) ThenElseIf not, is there an alternative to implement this? Thanks for the assistance. Link to comment Share on other sites More sharing options...
slow Posted June 23, 2010 Share Posted June 23, 2010 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"Else 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 More sharing options...
juser73 Posted August 18, 2010 Share Posted August 18, 2010 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 statementWHEN $V{SUM} >= $V{total_average} THEN '+' ELSE '-' Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now