Cross Tab Alternating Background Color
Trouble viewing images? Click on images to enlarge.
In this article we cover setting up alternating colors for your rows/columns in a Cross Tab. If you would like to download the sample View used in this demonstration, scroll down to the bottom of the page where there will be a download link available, or click here. (Download)
Example Alternating Colors for Rows and Columns:
Steps To Set Alternating Colors In Cross Tabs
Note: It will be important to note the two expressions will differ based on whether or not you want to apply alternate colors in a row or column format. The image below provides a preview of alternating colors in both a row and column format.
Expression #1 - Alternating Columns: Iif([Arguments.GroupColumnIndex] % 2 =0,'LightGray','Transparent')
Expression #2 - Alternating Rows: Iif([Arguments.GroupRowIndex] % 2 =0,'LightGray','Transparent')
1. Open/Create your View, then go into the Finished Reports.
2. Create your Cross Tab for the report. If you want the entire row / column to alternate colors, mouse over the indicated areas and click. The cursor will turn into a black arrow if done correctly.
3. Once the column / row is selected you will then need to go to the Expression Editor for the Background Color.
4. Enter one of the provided expressions into the Expression Editor.
Note: If you are looking for alternate colors in rows, use the Row expression. If you are looking for alternate colors in columns, use the Column expression.
Column Expression: Iif([Arguments.GroupColumnIndex] % 2 =0,'LightGray','Transparent')
Row Expression: Iif([Arguments.GroupRowIndex] % 2 =0,'LightGray','Transparent')
Optional: If you would like to add colors that are not part of the alternating colors, make sure there is no expression set by clicking on the individual cell and clicking on the Active Expression Indicator then selecting Reset. Once there is no expression, set the color of your choice and repeat for each cell you need.
Resetting the Expression Editor Functions
Individually Set Color
5. Preview and verify the results. Once you have the desired results, click Save!
Please sign in to leave a comment.