Jasinski Technical Wiki


Home Page
All Pages

Quick Search
Advanced Search »

Contributor Links

Create a new Page
File Management
Your Profile

Other Wiki Sections



GreenBar in Reports - SSRS

Modified on Wed, Jan 23, 2013, 4:26 PM by Administrator Categorized as SSRS (SQL Server Reporting Services)


The term greenbar is taken from tractor-feed paper that was used in computer printers in the 1970s and 1980s. It had bands of green across the width of the page so that three lines of data would be on a white background, alternating with three lines on a green background. This was done to make it easier to read across long lines of data. This article demonstrates how to reproduce this effect in Reporting Services.


1. Layout your data in a Table control, with group headers and footers as required.

2. For the BackgroundColor property for the cells of interest, specify the following expression.

=Iif((RowNumber("table1")-1) Mod 6 < 3, "#c0ffc0", "White")

  • If you have no groups for your table then table1 should be the name of your table control. Otherwise, it should be the name of the lowest level group. Note that this string is CASE SENSITIVE.
  • The color #c0ffc0 is a light green. You can change it to suit your preferences.
  • The above code will color the lines in groups of three (three green alternating with three white). If instead you want to alternate each line (one green alternating with one white), use the following code instead.

=Iif((RowNumber("table1")-1) Mod 2 < 1, "#c0ffc0", "White")

ScrewTurn Wiki version Some of the icons created by FamFamFam. Except where noted, all contents Copyright © 1999-2024, Patrick Jasinski.