Plan a Map Report (Report Builder and SSRS)

Good reports present information that leads to actions or insights. To present analytical data such as sales totals or demographics against a geographic background, you can add a map to your Reporting Services paginated report. A map can contain multiple layers, where each layer displays map elements that are defined by a specific type of spatial data: points that represent locations, lines that represent routes, or polygons that represent areas. You can associate your analytical data with map elements on each layer.

Note

You can create and modify paginated report definition (.rdl) files in Report Builder and in Report Designer in SQL Server Data Tools. Each authoring environment provides different ways to create, open, and save reports and related items.

Good report design provides information that help users take actions to address issues. To create a useful, easily understood map display, decide what questions you want the map to help answer. For example, on a map you can visualize the following types of data to identify market opportunities:

Relative sales for each store.

Sales categorized by customer demographics, based on customer location relative to store locations.

Comparative sales or other financial data by sales territory.

Comparative sales for different discount strategies across multiple stores.

After you identify the purpose of the map display, you must analyze what data you need. Analytical data comes from report datasets. Location data comes from spatial data sources that you must specify.

Analytical data comes from a report dataset, from sample data included with a map from the map gallery, or from analytical data included with spatial data in an ESRI Shapefile.

Spatial data comes in three forms: points, lines, and polygons.

Points. Points specify locations, for example, a city or an address for a store, restaurant, or convention center. For every location that you want to display on a map, you must provide the spatial data for that location. After you add points to a map, you can display a marker at the point location and vary the marker type, size, and color.

Lines. Lines specify paths or routes, for example, delivery routes or flight paths. After you add a line to a map, you can vary the line color and line width.

Polygons. Polygons specify areas, for example, regions, territories, countries, states, provinces, counties, cities, or areas covered by cities, postal codes, telephone exchanges, or census districts. After you add polygons to a map, in addition to displaying the outline, you can display a marker at the center point of the area of the polygon.

After you identify which spatial data that you need, you must find a source for it.

Find a Source for Spatial Data

To find spatial data to use in your map, you can use the following sources:

ESRI Shapefiles, including publicly available Shapefiles that you can search for on the Internet.

Determine the Spatial Data and the Spatial Data Match Fields

To display analytical data on a map and to vary the size, color, or marker type, you must specify fields that relate the spatial data and analytical data.

Spatial data must contain the following fields:

Spatial data. A spatial data field that has the sets of coordinates that define each point, line, or polygon.

Match fields. One or more fields that uniquely identify each spatial data field. For example, for a store location point, you might use the name of the store. If the store name is not unique in the spatial data, you might include the name of the city as well as the store.

The match fields are used to relate the spatial data with the analytical data.

Determine the Analytical Data and the Analytical Data Match Fields

After you identify the spatial data, you must identify the analytical data. Analytical data can come from the following sources:

An existing report dataset. Fields are specified as simple field expressions, for example, [Sales] or =Fields!Sales.Value.

Data fields provided by the spatial data source. Fields are specified as keywords that begin with # followed the field name from the source of spatial data.

You must then determine the names of the match fields:

Match fields. One or more fields that specify the same information as the spatial data match fields to build a relationship between the spatial data and the analytical data. Match fields should match data type as well as formatting.

When you have identified the spatial data source, the spatial data, the analytical data source, the analytical data, and the match fields, you are ready to decide which type of map to add to your report.

To help your users interpret a map, you can add multiple map legends, a color scale, and a distance scale. When you design a map, plan where you want the legends to display. You can specify the following information about each legend:

Legend location. For example, legends can display inside or outside the viewport, and in 12 discrete locations relative to the viewport.

Good report design for maps require that you balance the options that control report performance and report definition size. Map elements that are based on spatial data, or Bing map tiles, can be static and embedded in the report definition or dynamic and created every time the report is processed. You must assess the trade-offs for static or dynamic map data and find the balance that works for your circumstances. Consider the following information to make this decision:

Embedded map elements can significantly increase the size of the report definition, but reduce the time that is required to view the map in the report. Your report server might have size limits that you need to work with.

The report definition specifies limits to the number of spatial data points that can be processed and a separate value that specifies the number of map elements that can be included in the report definition.

Dynamic map elements reduce the report definition size but increase the time that is required to process and render the map.

When the source of spatial data is located on the your computer, map elements are always embedded in the report definition. This includes spatial data from the Map Gallery or ESRI Shapefiles that have been installed locally.

To use dynamic spatial data, the spatial data source must be on the report server. When reports are designed in SQL Server Data Tools (SSDT), spatial data sources can be added to a project and published to the report server together with the report definition. If you are using Report Builder to design reports, you must upload the spatial data to the report server first, and then, in the wizard or in the layer properties, specify that source of spatial data for the map layer.