Shading evry second line in DETAIL band

My user wants every second line in DETAIL band shaded. Any one have any clue how to do this?

jkeri's picture
863
Joined: Mar 15 2013 - 12:17pm
Last seen: 4 years 4 months ago

3 Answers:

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-jas...

darth_fader's picture
Joined: Mar 7 2010 - 9:45pm
Last seen: 1 week 1 day ago

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 band

3- create a 'PRINT WHEN TEXT EXPRESSION' for the band. Use the following:

new Boolean($V{PAGE_COUNT}.intValue()%2==0)

jkeri's picture
863
Joined: Mar 15 2013 - 12:17pm
Last seen: 4 years 4 months ago

Be sure to set Stretch Type property to "Relative to Band Height" when using jkeri's method. :-)

hozawa's picture
176655
Joined: Apr 24 2010 - 4:31pm
Last seen: 3 years 11 months ago
Feedback
randomness