miles120 Posted March 18, 2008 Share Posted March 18, 2008 I'm new to iReport, and am hung on one small issue. I'm trying to print a Y/N field on my report, from data that is cast as a BigDecimal. I've tried this many ways, but I'll just post one of them here: ($F{billable} == 1) ? "Y" : "N" The error I receive during compilation is "Incompatible operand types Integer and int". Any help would be greatly appreciated. Link to comment Share on other sites More sharing options...
Pedja Posted March 19, 2008 Share Posted March 19, 2008 The error says that $F{billable} is type Integer, and you can't compare it with 1 which is a simple type int. Try ($F{billable}.intValue()== 1) ? "Y" : "N" Link to comment Share on other sites More sharing options...
miles120 Posted March 23, 2008 Author Share Posted March 23, 2008 Pedja, Thanks for the correction. An associate of mine suggested that I use a Case statement in my SQL query, and that also worked well. Link to comment Share on other sites More sharing options...
miles120 Posted March 23, 2008 Author Share Posted March 23, 2008 Pedja, Thanks for the correction. An associate of mine suggested that I use a Case statement in my SQL query, and that also worked well. 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