p_a Posted October 21, 2006 Share Posted October 21, 2006 Hello, I want to use print experssion in my reports: ( $V{salary}>0 ? "test1" : "test2" ) but I got this problem : "The operator > is undefined for the argument type(s)Long, int" How can I use arithmetic oprand in this expression? Is it possible to hide a staic text in iReport accordingto the conditoion? Please help me to solve my problems. Link to comment Share on other sites More sharing options...
teodord Posted October 30, 2006 Share Posted October 30, 2006 Hi, Note that by report expressions are Java expressions (by default). Your expression is not a correct Java expressions. You should use: Code:$V{salary}.intValue() > 0 ? "test1" : "test2 Testing the salary variable for null in the condition should also be appropriate. I hope this helps.Teodor 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