Jump to content
Changes to the Jaspersoft community edition download ×

coloring groups


Recommended Posts

By: vivek srinivasan - viveksrinivasan

coloring groups

2003-09-30 10:50


I have used grouping in my report and it groups according to the store id.

i want to have alternating colors for each set of groups.For instance, i want my group with store id 10 to be white and store id with 11 to be grey and store 13 to be white again

How can this be acheived?







By: Mark Rhodes - mrhodes2

RE: coloring groups

2003-09-30 12:21

You'll have to get creative.


Create a local variable (storecount) that increments by 1 for each change in storeid. Now add a square and color it light grey. Add a print when (v${storecount}.doublevalue()%2) == 1 to the square.


What this is saying is only print the square when the store count is an even number.


Some of my syntax my not be exact, but the concept is.


You could accomplish a similar function in SQL itself if you are more comfortable. Add a calc to your SQL statement that returns 'white' or 'grey' and then use that field in the print when statement of the greay box.

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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