monesseldeur Posted November 5, 2008 Share Posted November 5, 2008 Hi all, this is my first post here. I've been working with iReports and Jasperreports for a while now. Create some nice dynamic reports using java code. But I'm stuck with one problem I obviously can't solve alone: I want to use alternate colors for the rows in a crosstab. I have found this solution on the net:As you noticed, a crosstab's expression context is different from the report's expression context. The REPORT_COUNT variable does not exist in a crosstab's scope. We are going to create instead crosstab variables holding the row and column indexes. 1. Until then, you can use a crosstab parameter as a row counter. The parameter would be a mutable integer and 2. would get incremented in an expression inside the row header. 3. The row counter value would be used then inside the crosstab cells. I figured out step 1. But can anyone help me with step 2 and 3. Thanks a lot.Post Edited by Debrabandere Francis at 11/09/08 10:05 Link to comment Share on other sites More sharing options...
monesseldeur Posted November 9, 2008 Author Share Posted November 9, 2008 Isn't there anyone with a similar problem? Link to comment Share on other sites More sharing options...
tleveque Posted December 9, 2008 Share Posted December 9, 2008 Yes I have the same problem!!Have you figured out how to do it?Post Edited by Thierry Lévèque at 12/09/08 15:31 Link to comment Share on other sites More sharing options...
phantastes Posted December 11, 2008 Share Posted December 11, 2008 I have the same problem as well. Any thoughts? Link to comment Share on other sites More sharing options...
waliahimanshu Posted December 26, 2008 Share Posted December 26, 2008 make one Style choose the default colourand then add another colour with this rowcount coding i.e new Boolean($V{ROW_COUNT}.intValue()%2==1)Simply apply the stlye to the "Element Properties"Code:new Boolean($V{ROW_COUNT}.intValue()%2==1) Link to comment Share on other sites More sharing options...
waliahimanshu Posted December 26, 2008 Share Posted December 26, 2008 choose the default colour and then add another colour with this rowcount coding i.e new Boolean($V{ROW_COUNT}.intValue()%2==1) Simply apply the stlye to the "Element Properties" 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