Exploding maps in Reporting Services 2008 R2
Posted
by Rob Farley
on SQL Blog
See other posts from SQL Blog
or by Rob Farley
Published on Mon, 12 Apr 2010 22:43:00 GMT
Indexed on
2010/04/12
22:54 UTC
Read the original article
Hit count: 540
Kaboom!
Well, that was the imagery that secretly appeared in my mind when I saw “USA By State Exploded” in the list of installed maps in Report Builder 3.0 – part of the spatial offering of SQL Server Reporting Server 2008 R2.
Alas, it just means that the borders are bigger. Clicking on it showed me.
Unfortunately, I’m not interested in maps of the US. None of my clients are there (at least, not yet – feel free to get in touch if you want to change this ‘feature’ of my company).
So instead, I’ve recently been getting hold of some data for Australian areas. I’ve just bought some PostCode shapes for South Australia, and will use this in demos for conferences and for showing clients how this kind of report can really impact their reporting.
One of the companies I was talking about getting shape files sent me a sample. So I chose the “ESRI shapefile” option you see above, and browsed to my file. It appeared in the window like this:
Australians will immediately recognise this as the area around Wollongong, just south of Sydney. Well, apart from me. I didn’t. I had to put a Bing Maps layer behind it to work that out, but that’s not for this post.
The thing that I discovered was that if I selected the Exploded USA option (but without clicking Next), and then chose my shape file, then my area around Wollongong would be exploded too!
Huh! I think this is actually a bug, but a potentially useful one!
Some further investigation (involving creating two identical reports, one with this exploded view, one without), showed that the Exploded View is done by reducing the ScaleFactor property of the PolygonLayer in the map control. The Exploded version has it below 1. If you set to above one, your shapes overlap.
I discovered this by accident… I guess I hadn’t looked through all the PolygonLayer options to work out what they all do.
And because this post is about Reporting, it can qualify for this month’s T-SQL Tuesday, hosted by Aaron Nelson (@sqlvariant).
© SQL Blog or respective owner