SSRS 空间数据颜色
在 MS Reporting Services 中,我有一个国家的空间地图,例如美国。我希望每个州都有不同的颜色。但我希望它是固定的颜色。
数据是从 SQL Server 数据库中提取的,该数据库具有每个州的 RGB 值。假设加利福尼亚州是#000000,马里兰州是#FFFFFF。我不知道如何在 SSRS 中指定每个状态的颜色。我已经研究多边形颜色规则一天了。
谁能帮助我?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
这适用于形状等的空间查询(SQL Server 2012 中的几何数据类型)。
This works fine for spatial query with shapes etc. (Geometry datatype in SQL Server 2012).
这是一个可怕的答案,但我能想到的唯一方法是创建一个自定义调色板,并将您的数据元素与一些数据值绑定到调色板。
深入研究 2008 R2 RDL 规范 ,看起来这是为地图多边形自定义颜色的唯一方法;您定义一个自定义调色板,然后将数据字段绑定到该调色板。看起来您不能直接手动指定多边形颜色,也不能使用数据驱动的调色板。
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.
如果您将各州的足迹在空间上存储为多边形,则可以在地图控件中将它们创建为新图层。
然后只需使用表达式来设置您可能需要使用图层的透明度和排序选项的填充颜色。
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.