tetef Posted March 27, 2009 Share Posted March 27, 2009 hello ,I want color (red and yellow) a box in my table according to the resultat of the request that me returns :severity 1 -> red or severity 2 -> yellow Link to comment Share on other sites More sharing options...
iddsathish Posted March 29, 2009 Share Posted March 29, 2009 Hello According to my knoweledge dynamic formatting is not directly providedyou can do this using "Print when Expression".you should create 2 boxes A & Bbox A color red and box B yellow colornow in box A print when expression use expression likenew Boolean ($F{severity} == 1?true:false)and in box B print when expression use expression likenew Boolean ($F{severity} == 2?true:false)this will help U. Link to comment Share on other sites More sharing options...
Gaby38 Posted March 29, 2009 Share Posted March 29, 2009 I never tested for this use, but perhaps is it also possible to use conditionnal style, that is to set the background color for example according to a boolean expression. It's more "light" to manipulate than several boxes and "print when".I have already used that for alternate color stripes in the detail section, by putting the text fields inside a frame which has a conditionnal style driven by the value of "report_count modulo 2".I don't know if it is possible with a crosstab objectPost Edited by Gabriel Entressangle at 03/29/09 17:39Post Edited by Gabriel Entressangle at 03/29/09 17:40PS : there is also a "style" property in a crosstab "box", so I think that the conditionnal style may be used to have different background colors.Post Edited by Gabriel Entressangle at 03/29/09 17:49 Link to comment Share on other sites More sharing options...
madcompie Posted October 15, 2010 Share Posted October 15, 2010 The modulo 2 works also fine in the detail band!Create a filled rectangle around the details and attach the following expression to the "print when expression" property:line 1 : no rectangle printedline 2 : rectangle printedline 3 : no rectangle printedline 4 : rectangle printedetc... Code:new Boolean($V{REPORT_COUNT}.intValue()%new Integer(2).intValue()==0) 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