Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

SSRS 2008 R2 legend colors not matching chart series colors

Posted on 2016-10-20
4
Medium Priority
?
319 Views
Last Modified: 2016-10-20
I have a stacked bar chart with conditional formatting on the series fill depending on a severity field and the legend colors are not matching.  Below is my conditional formatting on the series, why does the legend not match?

=Switch(Fields!severity.Value = "Sev4", "CornflowerBlue",
Fields!severity.Value = "Sev3", "Gray",
Fields!severity.Value = "Sev2", "Gold",
Fields!severity.Value = "Sev1", "Red")
0
Comment
Question by:szadroga
  • 2
  • 2
4 Comments
 
LVL 13

Accepted Solution

by:
Arifhusen Ansari earned 2000 total points
ID: 41852224
I don't know where did you set the property.

Please find the below screenshot.

First you need to right click on series of the Graph and go to series property.

2016-10-20_20-13-52.png
Go to Fill section and set the customer color for the series there.

2016-10-20_20-14-54.png
And also please note that comparison in ssrs in case sensitive. Please check your data as well..
For your reference switch example
=Switch(
Fields!Region.Value="Canada","Purple"
,Fields!Region.Value="France","Yellow"

)

Open in new window

Hope it will help you.
0
 

Author Comment

by:szadroga
ID: 41852254
I did put my conditional logic under Series Properties > Fill.  The chart is reflecting the appropriate color logic, its the legend that just shows the same colors for each value.  Adding screenshot...

2016-10-20_11-06-24.png
0
 
LVL 13

Expert Comment

by:Arifhusen Ansari
ID: 41852281
It should work as it's working in my case.

2016-10-20_20-48-07.pngI should not ask this but still have you checked your condition for formatting is working fine.
0
 

Author Closing Comment

by:szadroga
ID: 41852309
appears it was the SWITCH statement.  I converted the logic to a nested IIF and it worked.  thx for your help
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A recent questions about how to add SSRS named instances, couldn't find any that talks about SQL server 2008, anyway I decided to help by creating some screen shots. The installation is straightforward, you just pop the SQL server 2008 installati…
Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…

886 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question