The instruction below is for one group header. But it can be easily extended for use with multiple group headers.
- Create a group in the report.
- At the Report level, select the Script tab.
- Set iRow = 0 in initialize() method of the report. “iRow” could be any variable name.
- Return to the Layout tab of report and select the Group header row (where you want to apply style).
- Click on Script tab. Select onRender from Script drop down
- Enter the script below:
if (iRow == 0) {
this.getStyle().backgroundColor = "silver";
iRow = 1;
} else {
this.getStyle().backgroundColor = "white";
iRow = 0;
} - Done. Preview the report to see the changes.