jlopes151 Posted February 18, 2008 Share Posted February 18, 2008 What I want ot do is change the color of a row depending upon the row number being odd or even. even = blueodd = white Link to comment Share on other sites More sharing options...
svenn Posted February 19, 2008 Share Posted February 19, 2008 Do a search on alternating the row color. Link to comment Share on other sites More sharing options...
jlopes151 Posted February 19, 2008 Author Share Posted February 19, 2008 I found that if I setup a style I can alter the bgcolor of a field but not a frame. Link to comment Share on other sites More sharing options...
svenn Posted February 19, 2008 Share Posted February 19, 2008 Check out this post http://www.jasperforge.org/index.php?option=com_joomlaboard&Itemid=215&func=view&id=36885&catid=9 Link to comment Share on other sites More sharing options...
jlopes151 Posted February 19, 2008 Author Share Posted February 19, 2008 Goto it here's what I did Use a frame for your table rows, insert the table fields into the frame. From the main menu select Format > Styles in the Styles dialog there should be the default style. Select it then click modify. Leave the Default condition, click the Add button. In the expression editor pane enter the following:new Boolean($F{ROWNUM}.intValue() % 2 == 0). The ROWNUN field is available in any RDBMS table so don’t worry. All you need to do is the set the bgcolor and ADD another style to the default for the alternate condition as in new Boolean($F{ROWNUM}.intValue() % 2 != 0) Select the row frame in the Document Structure pane, select the frames properties, uncheck the Transparent checkbox, make sure the style is set to the default_frame and that the “Print repeated values†checkbox is checked. That’s it 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