Coloring Databar in Tablix WITH PALETTE (Reporting Services)
I have a Report in Reportin开发者_开发知识库g Services 2008 R2 with the following Dataset.
- Name | Value
- Gabriel | 10
- Peter | 8
I have the following Tablix with 3 Columns:
- Name
- Databar
- Value
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.
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.
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")
精彩评论