Display alternating row colors in a scorecard
This article shows you how to display alternating row background colors in a scorecard or report.
2. Data preparation
For this example, create a data connector for a SQL Server Analysis Services (SSAS) database such as AdventureWorks.
3. Design the scorecard
Create a new scorecard from the main menu and configure it as follows:
- Go to Properties for the scorecard, click Layout, and set the Width to 600 pixels.
- Drag the Product hierarchy from your data connector to the scorecard grouping area (drag a column or hierarchy here...). This will cause the scorecard body contents to be repeated once for each product.
- Drag the Product hierarchy from your data connector to the scorecard body. It will appear as a data label for displaying the product name.
- Drag the Sales Order \ Order Count measure from your data connector to the scorecard body. It will appear as a data label for displaying the order count for the product.
- Add two label components to the scorecard header to be used as headings. Set their font color to White.
- Click inside the scorecard header to select it and go to Properties. Click Look and set the background of the header to DarkGray.
The scorecard looks as shown below.
4. Set up the alternating rows
Click inside the scorecard body and go to Properties. Click Look.
Leave the Background property unset.
Click the Background Palette plus sign twice to add two palettes (one for each row). Click each palette in turn and set its background color.
You can add more than two background palettes if you like. The scorecard will just cycle through each palette in turn.
5. View the scorecard
Switch to View mode to see the scorecard with alternating row colors.
6. See also