THE SQL Server Blog Spot on the Web

Welcome to - The SQL Server blog spot on the web Sign in | |
in Search

Stacia Misner

Do-It-Yourself Map Gallery in SQL Server 2008 R2 Reporting Services

A common question that I get when introducing the map feature in SQL Server 2008 R2 Reporting Services is why the map gallery is limited to maps of the United States and individual states in the US. The reason as I've heard it explained is that the political boundaries for other countries are sometimes in dispute and it was better to stay away from any legal issues that might arise from publishing a map as part of a software installation. Presumably that means that boundaries between states (and even towns) are not in dispute, but that's not entirely true as a CBS New report highlights.

Border integrity notwithstanding, the good news is that even though Microsoft doesn't give you international maps in the map gallery, you can do it yourself. The files that the Reporting Services installation provides are simply reports created using TIGER/Line Shapefiles available free from the United States Census Bureau and stored in the Program Files\Microsoft Visual Studio 9.0\Common7\IDE\PrivateAssemblies\MapGallery folder. (Look in the Program Files (x36) folder if you're developing on a 64-bit computer.) You can add your own reports to this same folder to update the map gallery.

You can't add just any report to the Map Gallery for this technique to work. The report must contain a map with embedded spatial data. You can create such a report by creating a map using any of the three options for spatial data - map gallery, ESRI Shapefile, or a SQL Server spatial query. Then, on the "Choose spatial data and map view options" page of the Map Wizard, you must select the "Embed map data in the report" option as shown below.

Using the map that I created for my post earlier this year about the map control, I eliminated the point layer and then saved the RDL file to the map gallery folder. Then whenever I want to create a new map for France, I can select it in the Map Wizard as shown below.

If you plan to use this option for making additional maps available to report developers, be aware that you must do this on every computer using Business Intelligence Development Studio to create reports. If you have users creating reports with Report Builder 3.0, you also need to store the map RDL in the following location: C:\Program Files\Microsoft SQL Server\MSRS10_50.MSSQLSERVER\Reporting Services\ReportServer\ReportBuilder\RptBuilder_3\MapGallery where MSRS10_50.MSSQLSERVER is the name of the Reporting Services instance.

Published Monday, August 30, 2010 7:54 PM by smisner



Heather L said:

Thank you. This has been really useful. I can't seem to get my additional maps to show up in the Report Builder Map 3.0 Map Wizard / Map Gallery. I've placed them into this directory: C:\Program Files\Microsoft SQL Server\MSRS10_50.MSSQLSERVER\Reporting Services\ReportServer\ReportBuilder\RptBuilder_3\MapGallery  

on the SSRS Server, and on my client machine. I've tried to restart the Report Server service. No go. It works like a charm in BIDS, but I'd like to expose it to report builder users. Any tips?

Thank you!

February 8, 2011 5:23 PM

smisner said:

Hi Heather, I was able to get it working in Report Builder on my machine - which is how I got the screenshot - but I've heard that others have had problems. In my case, I installed Report Builder as a standalone application which appears to give different behavior. I haven't set up a test environment without the Report Builder standalone installation to determine if that's the case, but that's my current theory!

February 10, 2011 9:09 PM

Heather L said:

That makes a lot of sense. I bet that is the difference as I've been using ReportBuilder off of the server which installs on the fly. It's unfortunate as it's less portable for business users, but that'a probably it. I'll give it a shot to verify.   Thanks!

February 11, 2011 9:20 AM
New Comments to this post are disabled
Privacy Statement