New spatial data types geometry and geography were introduced in SQL Server 2008 and the new map feature in SQL Server Reporting Services 2008 R2.
The report will use the AdventureWorksDW2012 database and show reseller sales amount by state (US).
The process of creating the map report consists of the following steps:
Code 1: Create datasets
Data Source:
Data Source=localhost;Initial Catalog=AdventureWorksDW2012
Dataset:
dsResellerSales
SELECT g.StateProvinceCode, SUM(f.SalesAmount) AS 'SalesAmount'
FROM dbo.FactResellerSales f JOIN dbo.DimDate d ON d.DateKey = f.ShipDateKey
JOIN dbo.DimReseller s ON s.ResellerKey = f.ResellerKey
JOIN dbo.DimGeography g ON g.GeographyKey = s.GeographyKey
WHERE d.CalendarYear = @CalendarYear AND g.CountryRegionCode = 'US'
GROUP BY g.StateProvinceCode
Dataset:
dsOrderYears
SELECT DISTINCT YEAR(f.OrderDate) AS 'OrderYear'
FROM dbo.FactResellerSales f JOIN dbo.DimDate d ON d.DateKey = f.ShipDateKey
JOIN dbo.DimReseller s ON s.ResellerKey = f.ResellerKey
JOIN dbo.DimGeography g ON g.GeographyKey = s.GeographyKey
WHERE g.CountryRegionCode = 'US'
ORDER BY 'OrderYear'

Figure 1: New map layer – choose a source of spatial data

Figure 2: New map layer – choose spatial data and map view options

Figure 3: New map layer – choose map visualization

Figure 4: New map layer – choose the analytical dataset

Figure 5: New map layer – specify the match fields for spatial and analytical data

Figure 6: New map layer – choose color theme and data visualization

Figure 7: Map layers – right click – map properties

Figure 8: Report parameter properties – calendar year

Figure 9: Preview reseller sales amount map
- SSRS_Map.zip
by Marian Placko
- Create CNN-style Map in Reporting Services
by Peichung Shih - Free Spatial Data
by DIVA-GIS - Generate SSRS reports from a SSIS Package
by Ravindra Chhabria - MapGallery of Reporting Services in SQL Server 2008 R2
by CodePlex - Migrating SQL Reporting Services to a new server
by Dale Kelly - Migrating SQL Reporting Services to a new server by moving the Reporting Services databases
by Dale Kelly - Moving the Report Server Databases to Another Computer
by TechNet - SQL SERVER – World Shapefile Download and Upload to Database – Spatial Database
by Pinal Dave - TIGER = Topologically Integrated Geographic Encoding and Referencing
by Census - Map Data
by VDS Technologies