cgn69 Posted September 11, 2008 Share Posted September 11, 2008 I'll start out by saying that I'm brand new to iReport. The lack of documentation has been frustrating to say the least. So far I've found very useful answers here in the forums. So now here's my question...I am creating a new report that needs a "stoplight". I have a field on my database that has a text representation of the status (Red, Green, Yellow). I have created three rectangles and in the Print when expression box have put the following:new Boolean($F{fieldname} == "Red") /* or green or yellowThe report compiles great and generates, but the rectangle doesn't display when it should. Ok it nevers displays. The field is a varchar and the database is Oracle. I know that the data is "Red" because I've interrogated it using a few other tools.Any pointers would be greatly appreciated! Link to comment Share on other sites More sharing options...
marcosamba Posted September 12, 2008 Share Posted September 12, 2008 try usingnew java.lang.Boolean ($F{FIELDNAME}.equals(new java.lang.String("Red")))ornew java.lang.Boolean ($F{FIELDNAME}.equals("Red")) let me know if it's ok Link to comment Share on other sites More sharing options...
cgn69 Posted September 12, 2008 Author Share Posted September 12, 2008 That worked perfectly! Thanks so much! Link to comment Share on other sites More sharing options...
svenn Posted September 12, 2008 Share Posted September 12, 2008 Documentation is available check to post pinned at the top of the forum. 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