Exploding maps in Reporting Services 2008 R2 – T-SQL Tuesday #005

April 13, 2010

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.

Exploded1

Alas, it just means that the borders are bigger. Clicking on it showed me.

image

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:

08-Apr-10 11-42-43 AM

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!

image

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.

image

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).

This Post Has 2 Comments

  1. George Doubinski

    "I’ve just bought some PostCode shapes for South Australia"
    Rob, whatever you paid, it was too much. ABS has published some of the census data in SHP format: http://goo.gl/0yk7z.
    –George

  2. Rob Farley

    Thanks George – good to know. I was happy to pay a small amount at the time, as I’d had no luck trying to find anyone who was publishing data like that, and it was cheap enough for me to not worry too much.

Leave a Reply

LobsterPot Blogs

Blog posts by Rob Farley and other LobsterPot Solutions team members.

Search