Alternate Color On Group Rows (BIRT)
This illustrates using highlight rules to alternate the backgroundColor of the row that displays header data. In some reports, there is no detail information. All of the information is contained in the group headers. For clarity, it is nice to have the group headers alternate colors. This example shows how to do that.
BIRT Version Compatibility
This example was built and tested with BIRT 188.8.131.52.
In order to make this work, you need to alternate the value of a global variable. This is best done in the OnRender method of the DataRow that is showing the Group information.
if (reportContext.getGlobalVariable("alt_grp") == false) reportContext.setGlobalVariable("alt_grp", true); else reportContext.setGlobalVariable("alt_grp", false);
Then all you need to do is add a highlight rule on the row. In the If following condition field enter
And in the condition drop-down select "is true". Then just apply the format rules you would like for the alternate groups.
Please enter comments below by selecting the edit icon to the right. You will need a Bugzilla account to add comments.