basti1985 Posted August 31, 2010 Share Posted August 31, 2010 Hello i have a report with a conditional-style.I have create a style and a condition but i can't get a condition that works.First of all i have 2 database-columns (e.g. part, gender) and want to set the font-color to green if gender == man and red if gender == woman.I try the following in a test where i have display both columns and set for the gender column this expression:and try also other examples but the is no go has someone a idea? Code:$F{Field}.toString().matches("Men") -> no work$F{Field}.toString() == "Man" -> no work$F{Field} == "Man" -> no work Link to comment Share on other sites More sharing options...
slow Posted August 31, 2010 Share Posted August 31, 2010 try this in your condition:new Boolean($F{Field}.toString().equalsIgnoreCase("MAN"))change the "Field" word properly with your field name.if you have a String field you can remove the toString() function.give us a feedback..._________________________________________if it works... give me KARMA points please! : ) _________________________________________listening: Muse - Plug In Baby [Live From Wembley Stadium]Post Edited by slow at 08/31/2010 10:12 Link to comment Share on other sites More sharing options...
basti1985 Posted September 7, 2010 Author Share Posted September 7, 2010 Thanks that works very well!Where can i get a list with such Attributes?? Link to comment Share on other sites More sharing options...
eduardobernal61 Posted August 19, 2015 Share Posted August 19, 2015 Email hola Una PREGUNTA quiero hacer Mismo Lo Que solista diferente mar de Lo Que declaro <style name="tipo_ut"><conditionalStyle><conditionExpression><![CDATA[new Boolean ($F{TIPO_UT}.diferents("ejemplo"))]]></conditionExpression><style mode="Opaque" backcolor="#FF3131"/></conditionalStyle></style> 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