Integrating maps in reporting services reports

 

As promised in my previous post, now I will describe the basic steps for integrating a map into a simple sales report. Again I am using Report Builder 3 as maps are available only there (unless you are not using some third party software or other functionalities). So before we start, there is a serious prep to be done. There are three options when it comes to choosing map source for the report. First you can take advantage of some preinstalled maps in a gallery, which provide the actual spatial information that to be matched against the report data (for example to match states by their names). The second option you have is to choose and ESRI shapefile which to integrate into your report (information on ESRI shapefile standard you can find here). The third option (which we will use in our case) is to use spatial information from SQL Server query and to lay it out on a cool map from Microsoft’s Bing.

So, as I mentioned, I will shortly describe option three, just to show you the cool stuff you can do with Report Builder. As we are using SQL Server as source for our spatial information, our query for the dataset must have a column, that contains spatial data. My query is a very simple one, containing two columns – one with aggregated value and one with geography data (how I got to geography data, you can check in my previous post here). After you got the query and sorted out the part with the spatial data, you can create a new report following next few easy steps:

1. Start a report with new Map Wizard

3_1

2. Select the third option for source of spatial data (of course after that step you should define the data source and the query for the report dataset)

3_2

3. The MAP – here are some interesting things worth mentioning. First of all there is the screen:

3_3

In the upper left part you will see the drop down box where you should choose the filed from your dataset, that contains spatial data. Usually the wizard finds it itself, so just make sure you have it :).

Then on the upper right part you will see the layer type. In our case we are using Point layer type and for the rest I will provide additional info in one of my future posts.

Now on the bottom part is the interesting stuff! There you can check the option for adding a Bing map which will automatically display a map from Microsoft Bing. On the top of that, you can choose from three types of map display – Road, Aerial or hybrid.

4. Choose a map visualization – I will use bubble map which allows me quickly to configure my map pointers to be shaped as circle and depending on the value of my aggregated field, to change its size (the bigger the aggregate, the bigger is the circle)

3_4

5. Configuring map pointers, theme and visualization

3_5

In the data field you should choose the field from the dataset that will be used for determining how big the bubble will be. In our case – the aggregated field from the dataset. Of course there are few other quick customizations possible, but for the purpose of my demonstration I will try not to get carried away :-).

When you are done, just click Finish and the map layer will be displayed in Report Builder 3 where you can play with some other customization (adding additional map layers, different pointers, remove some legends, change titles, etc.).

Now there is a screenshot of my final report (after playing with some properties myself)

3_6

I will continue exploring the world of map integration into reports and share my experience so stay tuned 😉

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s