I'm trying to highlight (silver background color) alternate rows in a BIRT report which has groups. Although I have implemented this solution the problem is that each group does not always start with a highlighted row. I want the highlighting rows reset for each group.
The way it is now:
Department A
Highlight
not highlight
Highlight
Department B
not highlight
Highlight
What I want is:
Department A
Highlight
not highlight
Highlight
Department B
Highlight
not highlight
Is there any way to acheive this?
I am using BIRT 4.2.2 and the dataset is a single sql query, grouped by department.
thanks
The solution is similar to the one linked, but additionally you need to define a running count of rows within a group.
To do so:
Add Aggregation...
button (on the right) and enter the following options:
groupRow
);Then amend the highlighting expression for the row to be:
row["groupRow"] % 2 Not Equal to 0
(instead of row[0] % 2 Equals 0
.)
If you now preview the report, you should find the odd-numbered rows within each group highlighted, as required.