pioppogatto Posted May 24, 2013 Share Posted May 24, 2013 Hello I'd like to have a step by step help to write a conditon expression in order to change a color af a field in my report.I added a conditional style to my report, what I need now is to write the condition expression.Java is the language property of my report.My field is a java.lang.String type and can assume two different values "Ok!" and "No good"The field is included in the details so that I can have a report like thismy_field_label-----------------------1 Ok!2 Ok!3 No goodWhat I need is to create the conditional style and if the value in the field is "Ok!" print the field with a green color if it's "No good" the color should be red. Link to comment Share on other sites More sharing options...
Thomas Zimmer Posted May 24, 2013 Share Posted May 24, 2013 Hi, condition expression:"Ok!".equals($F{my_field_label}) ? true : false=> green style"No good".equals($F{my_field_label}) ? true : false=> red styleCheers, Thomashttp://www.thomaszimmer.net 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