Jump to content
We've recently updated our Privacy Statement, available here ×

Zebra style vs print repeated values


caid235

Recommended Posts

I have a zebra style (alternating gray and white bands) defined and operating well on my report. I also have "Use blank when null" turned on for all the detail fields. Everything looks good, the zebra effect even showing up on the blank fields.  But when I uncheck "Print repeated value" the zebra style fails for the blank fields. What should I do?

 

Link to comment
Share on other sites

  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Hi,

Well this is not an advisable method to have alternate colored band, it is preferrable to use the Styles.

Now if you are using iReport/JasperSoft Studio you could locate Styles and then define Conditional styles in the styles.

Then you can use that conditional style, defining the Condition Expression for alternate coloring as - $V{REPORT_COUNT}%2 == 0 (This will give you alternate band coloring)

Hope thath this helps

 

Thanks
Ankur Gupta
http://ankurthetechie.blogspot.in/

 

Link to comment
Share on other sites

I am sorry, I didn't make myself clear.

I am using Styles to apply a Conditional Styles that checks the modulus of  a group count and applies the style when the modulus equals zero. As I said, this works well, and the styles applies across the page, even for blank fields UNTIL I uncheck Print Repeated Values. Then it doesn't apply to blank fields, giving the page a very unsatisfactory appearance.

Link to comment
Share on other sites

  • 1 year later...

Hello,

I also have the same problem in jasperReport library The used style applies condition expression for alternate coloring (white/gray is changing row by row). In Detail part of jrxml I have reportElement with isPrintRepeatedValues="false". The result contains empty "cells" (when the value from previous row is repeated), but with broken style (gray background is not present for this cell). For pdf it looks that the whole cell is without grey background, but for html, there is about 5 px wide part from left side grey color used and the rest is white.

Do you have any idea, how to change it to have that style visible for whole row alse for not printed repeated values?

Thank you.

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...