3

In MS Reporting Services I have a spatial map of a country, say the United States. I want each state to have a different color. But I want it to be a fixed color.

The data is pulled from a SQL Server database which has a RGB value for each state. Let's say California is #000000 and Maryland is #FFFFFF. I can't work out how to specify the color for each state in SSRS. I've been looking at Polygon Color Rules for a day now.

Who can help me?

Tae-Sung Shin
  • 20,215
  • 33
  • 138
  • 240
Radagast2005
  • 31
  • 1
  • 2

3 Answers3

2
  1. Right-click the layer in the Map Layers Window, then the Polygon Color Rules option. Make sure the Polygon Color Rule is set to 'apply template style'
  2. Right-click on the map/shape within the map control and click Polygon Properties, go to Fill, set fill style to Solid and click the expression button next to color picker. Enter expression for the color value (ex: =Fields!ColorName.Value)

This works fine for spatial query with shapes etc. (Geometry datatype in SQL Server 2012).

DevDav
  • 346
  • 1
  • 5
  • 17
0

It's a horrible answer, but the only way I can come up with it is to create a custom palette and tie your data elements to the palette with some data value.

Digging through the 2008 R2 RDL specification, it looks like this is the only way to do custom colors for map polygons; you define a custom color palette, then bind a data field to that palette. It does not look like you can directly specify the polygon color manually, or have data-driven palettes.

jklemmack
  • 3,518
  • 3
  • 30
  • 56
0

If you have the footprints of the states stored spatially as polygons, you can create them as a new layer in the map control.

Then simply use a expression to set the fill color you may need to play with the transparency and ordering options of the layers.

Jason Horner
  • 3,630
  • 3
  • 23
  • 29