Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Different Background Colors
kosta
Hello BIRT community,
how can I set for example background color of some grid or table cell depend of the group or row.
For example:
- the backround color of the cell of the first column and row 0 should be blue
- the backround color of the cell of the first column and row 1 should be red
- the backround color of the cell of the first column and row 2 should be yellow
also the font color should be different.
Thanks in advance.
Find more posts tagged with
Comments
afp
Try Highlights.
You find it by select your detail cell, then in the "Property Editor" you choose "Highlight".
kosta
Thanks for the answer afp, that's a good hint.
I will test that asap. I must test if the font color can be manipulated by this feature.
Beside that I have expected some scripting solution about this one.
Thanks in advance.
kosta
I just saw that on highlight you can set the font color, even the font size and style. Cool.
kosta
In the "onPrepare"-method of the Table Group setting counter:<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>groupCounter=0;</pre>
In the "onCreate"-method of the Table Group setting counter:<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>groupCounter++;</pre>
<br />
In the "onCreate"-method of the Table Detail Row setting counter:<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>if(groupCount == 1) { this.getStyle().backgroundColor = "#FFFF80" }</pre>