This is the third and final blog post of a three post set. This set shows you how to create a color palette code, how to use it in a chart. Then how to match the colors from a chart to a table (or matrix) in a SSRS report.
If you recall, I am using one of Enhansoft’s color palette codes with the GetColor function. That I first showed you in the post, Color Palette Codes in SSRS Defined and Explained. Here I take that code and synchronize the colors in a chart and a table that are displaying the same details.
Getting Started to Match the Colors in a Chart and a Table
In this example, similar to last week’s post, How to Use GetColor in a SSRS Chart. I am using the Mapped Drives report category found in Enhansoft Reporting.

As you can see from the above image, on the left-hand side of the table, the amount of free drive space is categorized into six groups. On the right-hand side of the table, the total number of mapped drives that correspond with the amount of free drive space is listed. Wouldn’t it be easier if you could immediately see the highest count in the table similar to what you see in the bar chart?
How to Match the Colors in a SSRS Report Chart and a Table
In order to make this report easier to read, I am going to add a column to the table. This new column will display the colors that are shown within the chart.
Note: The steps for a matrix are exactly the same as the ones for a table.

It might not look like we are starting from where we left off in the previous blog post, but we are. The default color palette is shown when you are on the Design page. This is why you don’t see the custom color palette used in the last blog post.
Starting from the Design page, highlight the table and then right-click on it (#1). Choose the Insert Column option (#2) and select which side you want the new column to appear. In this case, I chose the Right (#3) side.

Merge Title Cells
When I see the new column (#4), I then merge the column header cell with the, “Free Drive Space,” title column (header) cell. Doing so makes the column headers look seamless. Simply press the ctrl button and select with your mouse (left-click) the column-headers you are merging (#5 and #6). Next, right-click on the selection, and then in the pop-up menu, select Merge Cells (#7).

Once the two column header cells are merged, see how they appear to be only one column heading?

Next, I add the background color expression to the table under the cell’s properties. This is the exact same expression that I used within the chart.
=Code.GetColor(Fields!Free_Space.Value)
As a reminder, this expression for the GetColor function was used for the chart in the second blog post of this set. Before using the expression, I added my custom color palette code to the report. Now, by using the same expression as the one within the chart. The colors used in the table and the colors used in the chart are matched.
First, start by highlighting the cell (#8) where you wish to see the background color. On the right-hand side of the page, under Properties, look for BackgroundColor (#9) and click on the drop-down menu (#10). Next, select Expression… (#11).

In the Expression window, I copy the same expression that I used within the chart (#12) and click OK.

The above image compares both reports before and after the expression was added. Wouldn’t you agree that the second report is a better way to display the same results? When I look at the updated report, I can immediately spot the colors. I know exactly where to look in the table for more details.
Summary
This completes the three blog post-series about SSRS report color palette codes. From understanding the color palette code, configuring the chart properties to use the color palette function. Finally, matching the colors between a table and a chart. Using these tips can help make your reports easier to read too!
You can be certain that all of Enhansoft’s reports and dashboards make smart use of color in order to convey complex data in an instant! Let me know if ya’ll have tried anything similar and how it worked out for you. Until then, all the very best! You can contact me via Twitter @SuaresLeonard.