Reputation: 2744
I have a Report in Reporting Services 2008 R2 with the following Dataset.
I have the following Tablix with 3 Columns:
When I Run the report all the Databars are blue, However I wanted it to use the Palette.
Is there a way to call a Palette on an Expression or Code?
or a even better way to solve this?
Any help is appreciated.
I Don't want to specify fixed colors, I want to call a pallete by code.
Regards.
Upvotes: 2
Views: 2244
Reputation: 5170
In the Background box for the Databar, Select Expression and in the popup, put something like:
=IIF(Parameters.Field.Value > 10, "Green", "Blue")
FWIW, you can also nest IIF statements:
"=IIF(Parameters.Field.Value > 10, "Green", IIF(Parameters.Field.Value < 2, "Red", "Yellow"))"
EDIT:
Instead of:
=IIF(Parameters.Field.Value > 10, "Green", "Blue")
You could use the standard RGB color codes like:
=IIF(Parameters.Field.Value > 10, "#00ff00", "#0000ff")
Upvotes: 0
Reputation: 14295
Check the Custom Chart Color Palettes and Legends section of this article.
Either way,
To specify color values as constant or expression-based values, click the Series Style button on the appearance properties for the data value in the Edit Chart Value dialog box.
Upvotes: 1