design question

Hi,

is it possible, to give differing groups different backgroundcolors? So, i have a list of monthly values, grouped by year, and i want to have for every second year another backgroundcolor, grey for example.

I work with IReport...

and sorry for my english mistakes, i'm a bit out of training ;)
wegnerk's picture
995
Joined: Aug 28 2006 - 10:31pm
Last seen: 16 years 9 months ago

2 Answers:

It's possible by using conditional styles (introduced in JR 1.2.0).

What you need to do is:
-create a variable which increments by one for each year group
-create a style which specifies a grey background when this variable is even
-apply this style to a frame inside which you place all the report elements in the detail band (or apply it to a rectangle placed behind the elements in the detail band if you don't want Html or Excel output).

You can take a look at the "scriptlet" sample in the JR distribution to see something similar.

HTH,
Lucian
lucianc's picture
76616
Joined: Jul 17 2006 - 1:10am
Last seen: 4 days 17 hours ago
Hi lucian,

thanks a lot for your answer... problem solved after a bit of trial and error ;)

i needed a bit time to find out what 'frame' is in german :whistle:

regards
Post edited by: wegnerk, at: 2006/08/30 13:47
wegnerk's picture
995
Joined: Aug 28 2006 - 10:31pm
Last seen: 16 years 9 months ago
Feedback
randomness