Reporting Services 2008 R2: Geospatial Visualization – Part II

11.   Double-click the Map Item to see the Map Layer pane. You can see one Polygon Layer named PolygonLayer1 is in Map Layer. In order to show locations of customers, we need geospatial data related to customers’ location. The data we need exists with the analytical dataset we just created. Now we  add it to the map. The easiest way of adding this is adding another layer with the wizard. Click on the first icon in the Map Layer which is New Layer Wizard. Note that you can do the same with the second icon which is Add Layer. The only difference between these two is, the second icon  does not start a wizard and you have to set the dataset to the layer manually. If you have clicked the first icon, the wizard has opened and, to continue, you need to provide a data source for spatial data. Select the third radio button which is SQL Server spatial query and click on Next.

12.   Since we have already added the dataset we need, select the first radio button which is Choose an existing dataset with SQL Server spatial data in this report and select the SalesByCustomer dataset. Your screen should be as below:

Click Next to continue.

13.   The window you see now is  Choose spatial data and map view options. En sure that SpatialLocation is selected in the Spatial field drop-down and that Point is selected in the Layer type drop-down. Check the Embed map data in this report checkbox and leave the Add a Bing Map layer checkbox unchecked. Click Next.

14.   The next  screen is for setting the visualization of the data. Remember, we are going to show the ranks of customer within markers, hence the best selection is the Analytical Marker Map. Note that you can also use Bubble Map .

Click Next to continue with the wizard.

15.   The next window is for selecting or adding an analytical dataset to the layer. Since the added dataset,  SalesByCustomer, contains analytical data as well, we can use this. Note that if you had selected Basic Marker Map in the previous window, you would not get this window. This window appears only for the Bubble Map and the Analytical Marker Map. If you need to load analytical data with a different dataset, you will need to make sure that the new dataset has a matching field which can be used for matching records in the spatial dataset.

Select SalesByCustomer and click Next.

16.   The next window is for setting the relationship between the spatial dataset and the analytical dataset. Use BusinessEntityID to match datasets.

Click Next to continue.

17.   Leave all checkboxes unchecked in the Choose color them and data visualization window. Select Generic for Theme. Click Finish to complete the wizard. Here is our report now.

18.   Now to add marker types to the report. Since we have 5 ranks for customers, we need 5 marker types for showing them.  On PointLayer1, click the down-arrow () and select the Marker Type Rule… item.  This opens the  Map Marker Type Rule Properties window.

19.   Select the second radio button which is Visualize data by using markers. When this  is selected, the Data filed drop-down is shown. Select #Rank as the data field. The list below the drop-down contains the markers for data, in our case, for ranks. Set the first 5 markers as Start, Diamond, Triangle, Rectangle, and Circle. Delete the other markers.

20.   Now click on the Legend tab. Remember, we have a legend in our map report, which is has not yet been used. We can use it for showing the meaning of markers. Make sure Legend1 is selected in the Show in this legend drop-down. Change the Legend text to Rank – #TOVALUE{N0}. Note that #FROMVALUE and #TOVALUE are decided by Map Marker Type Rule based on the number of distinct values in the Data field we  selected. Since we have only 5 values and we have added 5 markers  ,  the legend will be shown  as Rank – 1, Rank – 2, …. and Rank – 3.

Click OK to save the settings.  If you preview the report you should see that the customer’s locations are shown with selected markers.

21.   The next step is adding colors to markers. As a generic rule, we show the best in green and the worst in red.   Go to the designer and double-click the Map Item to see Map Layers. Click the down-arrow () on PolygonLayer1 and select Point Color Rule… item. Once the Map Color Rules Properties window is open, select the third radio button – Visualize data by using color ranges. Since we are going to apply color rules on Rank, select #Rank as Data filed. Set the start color as green, middle color as Yellow, and end color as red.

Go to the Legend and make sure that no legend is selected. If you need you can have it but having another legend for a common rule will not be useful. Click OK to save the settings.


Leave a comment

Your email address will not be published.