Visualizing Spatial Data – Creating a spatial report
March 11, 2013 2 Comments
In the last few posts in the series, I showed you how to enrich your dataset with spatial data. Now you need to start thinking about how you want to visualize your data, so that (for example) your business analysts can start using the data. But how do you start with that?
For every report I create, I use Report Builder 3.0 myself. This tool is a bit smaller and more responsive than the Business Intelligence Development Studio (BIDS).
Create the basic report first
Starting to build your report starts with creating a blank report from the menu in Report Builder:
Once you’ve done that, you need to add a data source to your report:
Then add a map control to your report, by right-clicking on you report, and choose Map:
Double-click on the map control, and in the menu that appears on the right, choose “New layer wizard”:
Click the last option (SQL Server spatial query) and click next.
Now you’re asked if you would like to create a new dataset in you report. In this case, you can just click next.
The same counts for the next step, datasources. Just select the datasource you created earlier, and click next.
In the next menu, we can select the data we want to use. In this case, I just want to select a city name and a spatial object. You can write this query in your SQL Server Management Studio (SSMS), or in this window. I wrote it in SSMS, and I want to copy it to my report. If you want to do the same, you need to click the option “Edit as Text”:
Just paste your query into the editor, and press the run button. Report Builder will retrieve your data, and shows you the results below:
Click next, and select the options you like in the next few menus. I’ll stick with the basic options. I didn’t change anything in the first menu, and in the next chose “Basic Map”:
Click next, click Finish. There you go, you just created your very first Spatial Report!🙂