{"id":1437,"date":"2012-11-13T00:00:00","date_gmt":"2012-11-13T00:00:00","guid":{"rendered":"https:\/\/test.simple-talk.com\/uncategorized\/report-building-3-0-adding-maps-to-your-reports\/"},"modified":"2021-05-17T18:33:19","modified_gmt":"2021-05-17T18:33:19","slug":"report-building-3-0-adding-maps-to-your-reports","status":"publish","type":"post","link":"https:\/\/www.red-gate.com\/simple-talk\/databases\/sql-server\/bi-sql-server\/report-building-3-0-adding-maps-to-your-reports\/","title":{"rendered":"Report Building 3.0: Adding Maps to Your Reports"},"content":{"rendered":"<div id=\"pretty\">\n<p class=\"start\">In the first three articles of the Report Builder 3.0 series (<a href=\"http:\/\/www.simple-talk.com\/sql\/reporting-services\/report-builder-3.0-creating-a-basic-report\/\">article 1<\/a> | <a href=\"http:\/\/www.simple-talk.com\/sql\/database-administration\/report-builder-3.0-formatting-the-elements-in-your-report\/\">article 2<\/a> | <a href=\"http:\/\/www.simple-talk.com\/sql\/reporting-services\/report-builder-3.0-adding-charts-to-your-report\/\">article 3<\/a>), you learned how to add tables and charts to a report and configure their properties. In this article, you&#8217;ll learn how to add a map, one of the most interesting visualizations available in Report Builder.<\/p>\n<p>A map is made up of one or more layers that display spatial and analytical data. The spatial data is what you&#8217;d normally think of as the map itself, such as a country&#8217;s outline or the outline of the states or provinces within that country. The analytical data provides meaning to the spatial data. For example, you might have a map whose spatial data provides an outline of Canada and its provinces and whose analytical data breaks down the population demographics for each province.<\/p>\n<p>In this article, we&#8217;ll create a map of the United States that includes the locations and sales totals for sales representatives in the AdventureWorks bicycle company (Microsoft&#8217;s fictitious company used to provide sample SQL Server data). If you want to create this map on your own system, you&#8217;ll need to create a Report Builder report and add a data source and dataset to the report that retrieve AdventureWorks data.<\/p>\n<p>On my system, I created a data source that connects to the <strong>AdventureWorks2012<\/strong> database on a local instance of SQL Server 2012. I named the data source <strong>AdventureWorks<\/strong>. I then created a dataset that uses the <strong>AdventureWorks<\/strong> data source to retrieve the necessary sales data. I named the dataset <strong>SalesData<\/strong>. Finally, I configured the dataset with the following T-SQL query:<\/p>\n<pre>SELECT\r\n\u00a0\u00a0p.FirstName,\r\n\u00a0\u00a0p.LastName,\r\n\u00a0\u00a0p.City,\r\n\u00a0\u00a0RTRIM(sp.StateProvinceCode) AS StateCode,\r\n\u00a0\u00a0p.SalesLastYear,\r\n\u00a0\u00a0a.SpatialLocation\r\nFROM\r\n\u00a0\u00a0Sales.vSalesPerson p\r\n\u00a0\u00a0INNER JOIN Person.BusinessEntityAddress ea\r\n\u00a0\u00a0\u00a0\u00a0ON p.BusinessEntityID = ea.BusinessEntityID\r\n\u00a0\u00a0INNER JOIN Person.Address a\r\n\u00a0\u00a0\u00a0\u00a0ON ea.AddressID = a.AddressID\r\n\u00a0\u00a0INNER JOIN Person.StateProvince sp\r\n\u00a0\u00a0\u00a0\u00a0ON a.StateProvinceID = sp.StateProvinceID\r\nWHERE\r\nCountryRegionName = 'United States'\r\nAND SalesLastYear &gt; 0; <\/pre>\n<p>The <strong>SELECT<\/strong> statement retrieves sales and location data for each sales representative. Notice that I use the <strong>RTRIM<\/strong> function to remove trailing spaces from the state codes. We&#8217;ll be using the state codes to map our analytical data to spatial data, which has its own state codes associated with it. The codes must match exactly. How we use the data will become clearer as we work though the exercise.<\/p>\n<p>After you&#8217;ve set up your environment, you&#8217;re ready to add the map. As mentioned above, a map is made up of one or more layers. Each layer is configured as one of the following types:<\/p>\n<ul>\n<li><strong>Polygon:<\/strong> Outlines of regions such as cities, states, provinces, and countries. For our example report, we&#8217;ll include a polygon layer that shows each state in the continental U.S.<\/li>\n<li><strong>Point:<\/strong> Specific points on a map. We&#8217;ll include one of these layers as well to identify the cities where the sales representatives reside.<\/li>\n<li><strong>Tile:<\/strong> A Bing map that often serves as a backdrop for other layers in the map. We&#8217;ll include one of these layers as well to provide an aerial image that sits behind the state and country outlines in the polygon layer.<\/li>\n<li><strong>Line:<\/strong> Path or route between two points. Our map will not include a line layer.<\/li>\n<\/ul>\n<p>Together, the three layers that we&#8217;ll be adding to our map-polygon, point, and tile-will provide a single view of the spatial and analytical data. We&#8217;ll add and configure the layers one at a time, in the order specified above.<\/p>\n<p>To demonstrate how to create the map, we&#8217;ll use a combination of wizards and other interface elements when adding the layers. I take this approach because Report Builder can be a bit quirky when working with maps, and some features seem to be more efficient than others. At the same time, I want to demonstrate how to work with each layer individually and how they fit together. That&#8217;s not to say you can&#8217;t do things differently, but if you follow along with what I&#8217;ve done, you should come out with a better conceptual understanding of how Report Builder works when it comes to maps. From there, you can fiddle around all you like to better familiarize yourself with how to use the various features.<\/p>\n<h2>Adding a Polygon Layer<\/h2>\n<p>There are a couple ways you can get started with adding a map to your report. You can go the wizard route, which adds the map surface and your first layer, or you can go the manual route, in which you first add the map surface and then add your first layer. We&#8217;ll go the latter so you can better see how each layer is incorporated into your map.<\/p>\n<p>The first step, then, is to go to the <strong>Insert<\/strong> ribbon, click the <strong>Map<\/strong> button, and then click <strong>InsertMap<\/strong>. Next, go to your design surface and drag your cursor from the top-left corner to the bottom-right of where you want to position your map, as you&#8217;ve done when adding a table or chart. When you release your mouse, your design surface should look similar to the one shown in Figure 1 (click to enlarge). You might need to resize or move items around, but basically you want a map surface that will display the continental U.S. in the correct proportions.<\/p>\n<p class=\"illustration\"><a href=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/imported\/1594-RptBldr04_Fig01.jpg\"><img decoding=\"async\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/imported\/1594-RptBldr04_Fig01small.jpg\" alt=\"1594-RptBldr04_Fig01small.jpg\" \/><\/a><\/p>\n<p class=\"caption\">Figure 1: Adding a map to your report<\/p>\n<p>When you click the map surface, the <strong>MapLayers<\/strong> windows appears to the right of the map, as shown in Figure 1. The <strong>MapLayers<\/strong> window displays each layer that you add to your map and let&#8217;s you access configurable properties associated with each layer.<\/p>\n<p>To add a polygon layer, click the <strong>Newlayerwizard<\/strong> button at the top of the <strong>MapLayers<\/strong> window. This launches the <strong>NewMapLayer<\/strong> wizard. On the first page of the wizard (<strong>Chooseasourceofspecialdata<\/strong>), you select the source type and a map gallery, as shown in Figure 2 (click to enlarge).<\/p>\n<p class=\"illustration\"><a href=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/imported\/1594-RptBldr04_Fig02.jpg\"><img decoding=\"async\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/imported\/1594-RptBldr04_Fig02small.jpg\" alt=\"1594-RptBldr04_Fig02small.jpg\" \/><\/a><\/p>\n<p class=\"caption\">Figure 2: Adding a new layer to your map<\/p>\n<p>Report Builder lets you choose one of the following three source types when defining a map layer:<\/p>\n<ul>\n<li><strong>Map gallery:<\/strong> A collection of maps that is installed when you install Report Builder. The maps are actually SQL Server reporting .rdl files that you embed in your own report. Initially, the gallery includes only maps of the United States and its individual states, which is why I chose the U.S. for our sample map. Selecting this option automatically creates a polygon layer.<\/li>\n<li><strong>ESRI shapefile:<\/strong> A set of files containing spatial data that complies with the Environmental Systems Research Institute (ESRI) standards. An .shp file specifies the geometrical or geographical shape. A .dbf file specifies attributes for the shapes. When you use a shapefile, the spatial data is embedded in your report.<\/li>\n<li><strong>SQL Server spatial data:<\/strong> Spatial data that comes from a SQL Server database.<\/li>\n<\/ul>\n<p>For our polygon layer, select (or retain) the default option, <strong>Mapgallery<\/strong>. Then, in the <strong>MapGallery<\/strong> pane, select <strong>USA by State<\/strong>. A map preview will be displayed on the right side of the page. Click <strong>Next<\/strong>.<\/p>\n<p>For the rest of the wizard, stick with the default settings and click your way to the end. When you&#8217;re finished, you should end up with a polygon layer that looks similar to the one shown in Figure 3 (click to enlarge). Notice that the layer is also listed in the <strong>MapLayers<\/strong> window.<\/p>\n<p class=\"illustration\"><a href=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/imported\/1594-RptBldr04_Fig03.jpg\"><img decoding=\"async\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/imported\/1594-RptBldr04_Fig03small.jpg\" alt=\"1594-RptBldr04_Fig03small.jpg\" \/><\/a><\/p>\n<p class=\"caption\">Figure 3: A polygon layer of the United States, including Alaska and Hawaii<\/p>\n<p>Because we&#8217;re dealing only with the continental U.S. for our report, we can remove Alaska and Hawaii. To remove a state, right-click it and then click <strong>DeletePolygon<\/strong>. After you delete the states, Report Builder will automatically resize the remaining states to fit the map surface, as shown in Figure 4 (click to enlarge).<\/p>\n<p class=\"illustration\"><a href=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/imported\/1594-RptBldr04_Fig04.jpg\"><img decoding=\"async\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/imported\/1594-RptBldr04_Fig04small.jpg\" alt=\"1594-RptBldr04_Fig04small.jpg\" \/><\/a><\/p>\n<p class=\"caption\">Figure 4: A polygon layer of the United States, excluding Alaska and Hawaii<\/p>\n<p>Now we need to configure several of the polygon layer&#8217;s properties to display the analytical data. In the <strong>MapLayers<\/strong> window, click the down arrow next to the polygon layer, and then click <strong>LayerData<\/strong>. When the <strong>MapPolygonLayerProperties<\/strong> dialog box appears, go to the <strong>Analyticaldata<\/strong> page, where you map your spatial data to your analytical data, as shown in Figure 5.<\/p>\n<p class=\"illustration\"><img decoding=\"async\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/imported\/1594-RptBldr04_Fig05.jpg\" alt=\"1594-RptBldr04_Fig05.jpg\" \/><\/p>\n<p class=\"caption\">Figure 5: Mapping analytical and special data<\/p>\n<p>In the <strong>Analyticaldataset<\/strong> dropdown list, select the dataset you created for the report. (My dataset is named <strong>SalesData<\/strong>.) Then click the <strong>Add<\/strong> button to add a mapping. In the <strong>Fromspatialdataset<\/strong> drop-down list, select <strong>STUSPS<\/strong>. These are the state codes generated by the U.S. Postal Service, and they&#8217;re the codes associated with the spatial data. In the <strong>Fromanalyticaldataset<\/strong> drop-down list, select <strong>[StateCode]<\/strong>, which is the field in the <strong>SalesData<\/strong> dataset that contains the state codes. That&#8217;s all there is to mapping the spatial and analytical data and associating the data in your dataset to the map layer. Click <strong>OK<\/strong> to close the <strong>MapPolygonLayerProperties<\/strong> dialog box.<\/p>\n<p>Next, we want to specify that the states contain no fill color. The reason we do this is because we want only the states with sales representatives to have color. But we must first get rid of all color and then add in the specific state settings. So go to the <strong>MapLayers<\/strong> window, click the down-arrow next to the polygon layer, and then click <strong>PolygonProperties<\/strong>. When the <strong>MapPolygonProperties<\/strong> dialog box appears, go to the <strong>Fill<\/strong> page and, in the <strong>Color<\/strong> drop-down list, select <strong>NoColor<\/strong>, as shown in Figure 6. When you&#8217;re finished, click <strong>OK<\/strong> to close the dialog box.<\/p>\n<p class=\"illustration\"><img decoding=\"async\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/imported\/1594-RptBldr04_Fig06.jpg\" alt=\"1594-RptBldr04_Fig06.jpg\" \/><\/p>\n<p class=\"caption\">Figure 6: Removing the fill color from your polygon layer<\/p>\n<p>The final settings to modify in the polygon layer are the color rules. This is where we set the colors to appear in those states that contain a sales representative. So return to the <strong>MapLayers<\/strong> window, click the down-arrow next to the polygon layer, and then click <strong>PolygonColorRule<\/strong>. When the <strong>MapColorRulesProperties<\/strong> dialog box appears, click the option <strong>Visualizedatabyusingcolorranges<\/strong>, as shown in Figure 7.<\/p>\n<p class=\"illustration\"><img decoding=\"async\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/imported\/1594-RptBldr04_Fig07.jpg\" alt=\"1594-RptBldr04_Fig07.jpg\" \/><\/p>\n<p class=\"caption\">Figure 7: Setting up color rules for your polygon layer<\/p>\n<p>Next, in the <strong>Datafield<\/strong> drop-down list, select <strong>[Sum(SalesLastYear)]<\/strong>. This means that the total amount in the <strong>SalesLastYear<\/strong> column will be used to define a range of values and the colors associated with them. As a result, the states with sales representatives will be colored based on the amount of sales, relative to the total. (This will become clearer when you see it in action.)<\/p>\n<p>After you&#8217;ve select a value from the <strong>Datafield<\/strong> drop-down list, select your range of colors. As you can see in Figure 7, I selected <strong>Khaki<\/strong>, <strong>Gold<\/strong>, and <strong>Tomato<\/strong>, mostly because I liked the names.<\/p>\n<p>Next, go to the <strong>Legend<\/strong> page to modify how the data is displayed in the legend. By default, the data is displayed numerically, but we want to change it to currency. To do so, modify the expression in the <strong>Legendtext<\/strong> drop-down list by changing the <strong>N<\/strong> in <strong>{N0}<\/strong> to <strong>C<\/strong> for both instances. Your equation should now look like the one shown in Figure 8. When you&#8217;re finished, click <strong>OK<\/strong> to close the dialog box.<\/p>\n<p class=\"illustration\"><img decoding=\"async\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/imported\/1594-RptBldr04_Fig08.jpg\" alt=\"1594-RptBldr04_Fig08.jpg\" \/><\/p>\n<p class=\"caption\">Figure 8: Configuring the legend for your polygon layer<\/p>\n<p>You&#8217;re just about finished configuring the polygon layer. But first, change the map title and the legend title. To do so, double-click the title and make your change. When you&#8217;re finished, your polygon layer should look similar to the one shown in Figure 9 (click to enlarge).<\/p>\n<p class=\"illustration\"><a href=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/imported\/1594-RptBldr04_Fig09.jpg\"><img decoding=\"async\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/imported\/1594-RptBldr04_Fig09small.jpg\" alt=\"1594-RptBldr04_Fig09small.jpg\" \/><\/a><\/p>\n<p class=\"caption\">Figure 9: Viewing your polygon layer in design mode<\/p>\n<p>Notice that the legend uses the colors we selected and that the amounts are listed as currency. Also notice that all the states are colored to match the figures in the legend. Report Builder uses sample data when rendering a map in design mode. The actual coloring and legend figures will not be visible until you run the report. So the next step is to click the <strong>Run<\/strong> button. The report and its map are displayed in preview mode, similar to what&#8217;s shown in figure 10 (click to enlarge).<\/p>\n<p class=\"illustration\"><a href=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/imported\/1594-RptBldr04_Fig10.jpg\"><img decoding=\"async\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/imported\/1594-RptBldr04_Fig10small.jpg\" alt=\"1594-RptBldr04_Fig10small.jpg\" \/><\/a><\/p>\n<p class=\"caption\">Figure 10: Viewing your polygon layer in preview mode<\/p>\n<p>As you can see, only a few states now have color. If you were to view the data returned by our dataset&#8217;s query, you would see that these are the states in which sales representatives reside. Because we mapped our dataset to our spatial data, Report Builder is able to color only specific states. What we&#8217;ve done here represents our first step in displaying both spatial and analytical data. However, as good of a start as this is, clearly our map does not include enough information to make it particularly useful. For that, we need to add a point layer.<\/p>\n<h2>Adding a Point Layer<\/h2>\n<p>The point layer will add specific locations to our map, in this case, the cities in which our sales representatives reside. To add the layer, go to the <strong>MapLayers<\/strong> window and click the <strong>Newlayerwizard<\/strong> button. The following steps walk you through the process of creating your point layer:<\/p>\n<ol>\n<li>When the <strong>NewMapLayer<\/strong> wizard appears, select the <strong>SQLServerspatialquery<\/strong> option, and then click <strong>Next<\/strong>.<\/li>\n<li>On the <strong>ChooseadatasetwithSQLServerspatialdata<\/strong> page, select your <strong>dataset<\/strong>, and then click <strong>Next<\/strong>.<\/li>\n<li>On the <strong>Choosespatialdataandmapviewoptions<\/strong> page, select <strong>SpatialLocation<\/strong> in the <strong>Spatialfield<\/strong> drop-down list and <strong>Point<\/strong> in the <strong>Layertype<\/strong> drop-down list. These should have been your default settings.<\/li>\n<li>Step through the rest of the wizard, using the default values.<\/li>\n<\/ol>\n<p>When you&#8217;re finished, a new layer is added to your map. However, all you&#8217;ll see are several circles that mark the cities where your sales representatives reside.<\/p>\n<p>As you can see, adding the point layer is simple enough, but now we need to configure several of the layer&#8217;s properties. In the <strong>MapLayers<\/strong> window, click the down-arrows next to the point layer, and then click <strong>PointProperties<\/strong> to launch the <strong>MapPointProperties<\/strong> dialog box, shown in Figure 11.<\/p>\n<p class=\"illustration\"><img decoding=\"async\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/imported\/1594-RptBldr04_Fig11.jpg\" alt=\"1594-RptBldr04_Fig11.jpg\" \/><\/p>\n<p class=\"caption\">Figure 11: Configuring the point layer on your map<\/p>\n<p>First, we need to define an expression for the <strong>Labeltext<\/strong> property, which determines what labels to assign to our points on our maps. The <strong>SpatialLocation<\/strong> field in our dataset determines where those points are located; however, we&#8217;ll use the <strong>City<\/strong> and <strong>StateCode<\/strong> values to specify how the labels will appear on the map. So click the expression button to the right of that property to launch the <strong>Expression<\/strong> dialog box, shown in Figure 12.<\/p>\n<p class=\"illustration\"><img decoding=\"async\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/imported\/1594-RptBldr04_Fig12.jpg\" alt=\"1594-RptBldr04_Fig12.jpg\" \/><\/p>\n<p class=\"caption\">Figure 12: Defining an expression for the Label property<\/p>\n<p>Our expression concatenates the city names and state codes, as you can see in Figure 12. I&#8217;ve also included the expression here for easy reading and copying:<\/p>\n<pre>=Fields!City.Value + \", \" + Fields!StateCode.Value <\/pre>\n<p>Once you&#8217;ve added the expression, click <strong>OK<\/strong> to close the <strong>Expression<\/strong> dialog box. Next, we will define an expression on the <strong>Tooltip<\/strong> property. So click the expression button next to that property and enter the following expression in the <strong>Expression<\/strong> dialog box:<\/p>\n<pre>=Fields!FirstName.Value + \" \" + Fields!LastName.Value + \" - \" + FormatCurrency(Fields!SalesLastYear.Value) <\/pre>\n<p>In this expression, we&#8217;re concatenating the first and last names, along with the total sales for that individual. Notice that I&#8217;m using the <strong>FormatCurrency<\/strong> method to display the sales value as a currency. This full name and total sales will be displayed as a tooltip when a user hovers over a point.<\/p>\n<p>Finally, we want to change the marker that designates each point on the map. By default, the marker is a circle, but we&#8217;re going to use a wedge (triangle) instead. In the <strong>Markertype<\/strong> drop-down list, select <strong>Wedge<\/strong>, and then, in the <strong>Markersize<\/strong> drop-down list, select <strong>7pt<\/strong>. Your <strong>MapPointProperties<\/strong> dialog box should now look like what is shown in Figure 13. Click <strong>OK<\/strong> to close the dialog box.<\/p>\n<p class=\"illustration\"><img decoding=\"async\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/imported\/1594-RptBldr04_Fig13.jpg\" alt=\"1594-RptBldr04_Fig13.jpg\" \/><\/p>\n<p class=\"caption\">Figure 13: Configuring the properties of your point layer<\/p>\n<p>You&#8217;re then returned to the design surface, which should now reflect the updated point layer. In place of the circles you saw earlier, you should see small wedges, and beneath each of those wedges, the <strong>&lt;&lt;Expr&gt;&gt;<\/strong> placeholder, as shown in Figure 14. The placeholders mark where the names of the cities will appear.<\/p>\n<p class=\"illustration\"><img decoding=\"async\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/imported\/1594-RptBldr04_Fig14small.jpg\" alt=\"1594-RptBldr04_Fig14small.jpg\" \/><\/p>\n<p class=\"caption\">Figure 14: Viewing your point and polygon layers in design mode<\/p>\n<p>Now&#8217;s a good time to run your report again. When you view your map in preview mode, it should include labels for each city and wedges to mark those cities&#8217; locations, as shown in Figure 15.<\/p>\n<p class=\"illustration\"><a href=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/imported\/1594-RptBldr04_Fig15.jpg\"><img decoding=\"async\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/imported\/1594-RptBldr04_Fig15small.jpg\" alt=\"1594-RptBldr04_Fig15small.jpg\" \/><\/a><\/p>\n<p class=\"caption\">Figure 15: Viewing your point and polygon layers in preview mode<\/p>\n<p>If you were to point to one of the cities, it would display the name and total sales for that particular sales rep. Now let&#8217;s see if we can make the map more interesting.<\/p>\n<h2>Adding a Tile Layer<\/h2>\n<p>Our final layer is a tile. To add the layer, go to the <strong>MapLayers<\/strong> window, click the <strong>AddLayer<\/strong> button, and then click <strong>TileLayer<\/strong>. This adds the new layer to your map surface. (You can tell that the layer has been added by the topography that now shows in Canada and Mexico.)<\/p>\n<p>Next, in the <strong>MapLayers<\/strong> window, click the down-arrow next to the tile layer, and then click <strong>TileProperties<\/strong>. In the <strong>MapTileLayerProperties<\/strong> dialog box, select <strong>Aerial<\/strong> from the <strong>Type<\/strong> drop-down list, as shown in Figure 16. (The default type is <strong>Road<\/strong>, but in this case, <strong>Aerial<\/strong> works better.)<\/p>\n<p class=\"illustration\"><img decoding=\"async\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/imported\/1594-RptBldr04_Fig16.jpg\" alt=\"1594-RptBldr04_Fig16.jpg\" \/><\/p>\n<p class=\"caption\">Figure 16: Changing the type of your tile layer<\/p>\n<p>Click <strong>OK<\/strong> to close the dialog box. Your background should now look much richer and darker, similar to a Google Earth shot.<\/p>\n<p>To adjust for the darker tile layer, we need to make a couple changes to the other layers. First, let&#8217;s change the font used to show locations in our point layer. In the <strong>MapLayers<\/strong> window, click the down-arrow next to the point layer and then click <strong>PointProperties<\/strong>. When the <strong>MapPointProperties<\/strong> dialog box appears, go to the <strong>Font<\/strong> page, shown in Figure 17.<\/p>\n<p class=\"illustration\"><img decoding=\"async\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/imported\/1594-RptBldr04_Fig17.jpg\" alt=\"1594-RptBldr04_Fig17.jpg\" \/><\/p>\n<p class=\"caption\">Figure 17: Configuring the font used for your point layer<\/p>\n<p>In the <strong>Style<\/strong> section, select the <strong>Bold<\/strong> checkbox, and in the <strong>Color<\/strong> drop-down list, select <strong>White<\/strong>. Then click <strong>OK<\/strong> to close the dialog box. The labels on your map should now be bold and in white.<\/p>\n<p>Next, in the <strong>MapLayers<\/strong> window, click the down-arrow next to the polygon layer and then click <strong>LayerData<\/strong>. When the <strong>MapPolygonLayerProperties<\/strong> dialog box appears, go to the <strong>Visibility<\/strong> tab. In the <strong>Transparency(percent)<\/strong> drop-down list, change the percentage to <strong>50<\/strong>, as shown in Figure 18. The transparency level will make the states with color look a bit better against the dark backdrop of the tile layer.<\/p>\n<p class=\"illustration\"><img decoding=\"async\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/imported\/1594-RptBldr04_Fig18.jpg\" alt=\"1594-RptBldr04_Fig18.jpg\" \/><\/p>\n<p class=\"caption\">Figure 18: Changing the transparency of your polygon layer<\/p>\n<p>Once you&#8217;ve configured the transparency, click <strong>OK<\/strong> to close the dialog box.<\/p>\n<p>The last step you might want to take is to remove the parallels and meridians from your map. To do so, right-click the map surface and clear the checkmarks before the <strong>ShowParallels<\/strong> and <strong>ShowMeridians<\/strong> options. When you&#8217;re finished, your map surface should look similar to the one shown in Figure 19 (click to enlarge).<\/p>\n<p class=\"illustration\"><a href=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/imported\/1594-RptBldr04_Fig19.jpg\"><img decoding=\"async\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/imported\/1594-RptBldr04_Fig19small.jpg\" alt=\"1594-RptBldr04_Fig19small.jpg\" \/><\/a><\/p>\n<p class=\"caption\">Figure 19: Viewing the tile, point, and polygon layers in design mode<\/p>\n<p>That&#8217;s all you need to do to configure you map. Your three layers should be complete, at least for now. Run the map once again. When you view it in preview mode, it should now look like the map shown in Figure 20 (click to enlarge).<\/p>\n<p class=\"illustration\"><a href=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/imported\/1594-RptBldr04_Fig20.jpg\"><img decoding=\"async\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/imported\/1594-RptBldr04_Fig20small.jpg\" alt=\"1594-RptBldr04_Fig20small.jpg\" \/><\/a><\/p>\n<p class=\"caption\">Figure 20: Viewing the tile, point, and polygon layers in preview mode<\/p>\n<p>As you can see, all three layers are displayed as one. And with the addition of the tile layer, you map looks richer and more interesting. Notice that the labels are now white and printed in bold. And the states in which the sales representatives reside are more transparent so that some of the background comes through.<\/p>\n<p>Of course, there is much more you can do with maps in Report Builder, but this introduction to the map features should provide you with a good idea of their potential. I encourage you to experiment with the various property settings and try out different ways to put together layers.<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>With Report Builder and SSMS, there isn&#8217;t much you can&#8217;t do in the way of the common reports and visualisations. One of the more interesting visualisations uses maps, and that, combined with layers, makes for an impressive way of representing data.&hellip;<\/p>\n","protected":false},"author":221841,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[143528],"tags":[4178,5753,5707,5527,4379,4150],"coauthors":[6779],"class_list":["post-1437","post","type-post","status-publish","format-standard","hentry","category-bi-sql-server","tag-bi","tag-maps","tag-report-builder-3-0","tag-reporting","tag-reporting-services","tag-sql"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/posts\/1437","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/users\/221841"}],"replies":[{"embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/comments?post=1437"}],"version-history":[{"count":5,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/posts\/1437\/revisions"}],"predecessor-version":[{"id":73776,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/posts\/1437\/revisions\/73776"}],"wp:attachment":[{"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/media?parent=1437"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/categories?post=1437"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/tags?post=1437"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/coauthors?post=1437"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}