jkeri Posted May 12, 2017 Share Posted May 12, 2017 My user wants every second line in DETAIL band shaded. Any one have any clue how to do this? Link to comment Share on other sites More sharing options...
darth_fader Posted May 12, 2017 Share Posted May 12, 2017 A common feature request. The key is using the $V{REPORT_COUNT} variable that's built in to every report in conjunction with a <style> element. Check out this solution at stack overflow: http://stackoverflow.com/questions/8980439/alternating-row-color-for-jasperreports Link to comment Share on other sites More sharing options...
jkeri Posted May 15, 2017 Author Share Posted May 15, 2017 I found an even easier way to do this:1- create a rectangle around the area to be shaded.2- push rectangle to the back of the band3- create a 'PRINT WHEN TEXT EXPRESSION' for the band. Use the following:new Boolean($V{PAGE_COUNT}.intValue()%2==0) Link to comment Share on other sites More sharing options...
hozawa Posted May 15, 2017 Share Posted May 15, 2017 Be sure to set Stretch Type property to "Relative to Band Height" when using jkeri's method. :-) 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