2005 IR Help Posted August 26, 2006 Share Posted August 26, 2006 By: targjack - targjack Group/band background color. 2004-05-05 16:58 Is there a way to set the background color of a group or a band. The problem is that for table heading fields the background color is set to blue. When a heading field strecthes, only the field that strecthed has a blue background. In this example the space between the lines is in blue. (which is very un attractive) ---------------------------- Multi One Line | Line |----------------- Heading | ----------- A solution would be greatly appreciated. By: Mark Engstrom - me2kme RE: Group/band background color. 2004-05-07 07:15 May be you could put a rectangle around your text field and use the stretchType="RelativeToTallestObject" option. If you look at the attached code this draws a coloured box around some text when the text can stretch and overflow. <rectangle> <reportElement x="0" y="0" width="802" height="8" backcolor="#FF9696"> <printWhenExpression>new Boolean($F{_Background_}.equals("0xFF5050"))</printWhenExpression> </reportElement> <graphicElement stretchType="RelativeToTallestObject" pen="None"/> </rectangle> <textField isBlankWhenNull="true" isStretchWithOverflow="true"> <reportElement x="186" y="0" width="26" height="8"/> <textElement textAlignment="Left" lineSpacing="Single"> <font reportFont="Serif_Normal" size="6"/> </textElement> <textFieldExpression>$F{Type}</textFieldExpression> </textField> Hope it helps. By: targjack - targjack RE: Group/band background color. 2004-05-07 08:19 That works nicely. Thanks. 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