New Feature: Playlist Center! Pick a topic and let our playlists guide the way.

Start learning with our library of video tutorials taught by experts. Get started

SQL Server Reporting Services in Depth
Illustration by

Using maps in Reporting Services


From:

SQL Server Reporting Services in Depth

with Simon Allardice

Video: Using maps in Reporting Services

Time to cover the last option in the Data Visualization section, adding maps to our reports. As you might imagine, if you want to use maps, it does put some expectations on the data that you have. It needs to be geographic in some fashion. While you can go very exact, all the way to working with GPS latitude and longitude coordinates, you don't need that to begin with. You can start off as long as you have some cities or states or counties. So, I want to add a map to this blank report that I just created a moment ago. I will choose the Map option and select Map Wizard.
Expand all | Collapse all
  1. 12m 6s
    1. Welcome
      1m 9s
    2. What you need to know
      1m 36s
    3. Exploring SQL Server Reporting Services components
      4m 17s
    4. Reviewing SQL Server versions
      5m 4s
  2. 49m 41s
    1. The elements of a report
      3m 10s
    2. Creating a report with Report Builder
      12m 11s
    3. Grouping table regions on a report
      6m 1s
    4. Joining data from multiple tables
      4m 33s
    5. Formatting report elements
      4m 34s
    6. Using functions in a report
      11m 0s
    7. Displaying data in a matrix
      8m 12s
  3. 24m 9s
    1. Filtering data and adding parameters to a report
      5m 35s
    2. Customizing report parameters
      5m 4s
    3. Sorting data in a data region
      4m 7s
    4. Applying interactive sorting
      4m 57s
    5. Creating a drillthrough action to connect reports
      4m 26s
  4. 49m 57s
    1. Introduction to charting in Reporting Services
      4m 16s
    2. Creating a column chart
      8m 35s
    3. Adding a generated average to a chart
      4m 5s
    4. Creating a pie chart
      8m 19s
    5. Using sparklines
      6m 38s
    6. Adding a sparkline to a drilldown matrix
      14m 34s
    7. Adding data bars
      3m 30s
  5. 21m 48s
    1. Adding indicators to a report
      7m 52s
    2. Using and configuring gauges
      5m 30s
    3. Using maps in Reporting Services
      8m 26s
  6. 38m 14s
    1. Creating modular reports with report parts
      4m 36s
    2. Adding and updating report parts
      4m 37s
    3. Using subreports and nested regions
      4m 28s
    4. Configuring headers and footers
      3m 9s
    5. Printing and exporting reports
      3m 45s
    6. Using page breaks
      5m 37s
    7. Creating and using shared data sources
      8m 11s
    8. Creating and using shared data sets
      3m 51s
  7. 27m 20s
    1. Organizing reports in Report Manager
      3m 1s
    2. Adding users and configuring report security
      5m 24s
    3. Configuring subscriptions
      5m 13s
    4. Creating a linked report
      4m 8s
    5. Using Report Designer in SQL Server Data Tools
      9m 34s
  8. 1m 2s
    1. Goodbye
      1m 2s

Watch this entire course now—plus get access to every course in the library. Each course includes high-quality videos taught by expert instructors.

Become a member
please wait ...
SQL Server Reporting Services in Depth
3h 44m Advanced Dec 13, 2012

Viewers: in countries Watching now:

Discover how to create, manage, and deliver interactive reports—not just to print, but to dynamically explore enterprise-level data—with Reporting Services in SQL Server. In this course, author Simon Allardice concentrates on using Report Builder to build and format reports from a variety of data sources, but also shows how to perform basic administration tasks such as granting user access and organizing reports in the Report Manager. Plus, learn how to add interactive sorting and filtering functionality to your reports, and create column and pie charts to better express your data.

Note: These tutorials are applicable to both the 2008 and 2012 versions of SQL Server.

Topics include:
  • Understanding the elements of a report
  • Grouping table regions
  • Joining data from multiple tables
  • Displaying data in a matrix
  • Customizing report parameters
  • Filtering and sorting data
  • Creating charts
  • Adding sparklines and data bars
  • Creating at-a-glance reports with indicators
  • Using Maps in Reporting Services
  • Configuring report security
  • Printing and exporting reports
Subjects:
Developer Databases
Software:
SQL Server
Author:
Simon Allardice

Using maps in Reporting Services

Time to cover the last option in the Data Visualization section, adding maps to our reports. As you might imagine, if you want to use maps, it does put some expectations on the data that you have. It needs to be geographic in some fashion. While you can go very exact, all the way to working with GPS latitude and longitude coordinates, you don't need that to begin with. You can start off as long as you have some cities or states or counties. So, I want to add a map to this blank report that I just created a moment ago. I will choose the Map option and select Map Wizard.

The first thing I'm asked for is a source of spatial data. Now, all maps in Reporting Services display two kinds of data: spatial data and analytical data, which is really what's the map and what's important about it? Spatial data describes the points, the regions or lines or areas of the map. Spatial data is what places exist. Now, right out of the box, I have a few examples in the Map Gallery section here that I can use. It is somewhat USA centric, but I have a folder with all the states by county that I can start to drill through and take a look, get a basic idea of what this map is.

And the spatial data is what's describing the boundaries of all these regions on the map. Underneath that I have three versions of a larger USA map as well. Up above, there are options to change this from the Map gallery to an ESRI shape file. If you have access to those, some of them are commercial, some are freely available that you could link to, for other countries and world maps and so on. And if you have a lot of GIS data internally, you could even write your own SQL Server spatial query that actually returns coordinates, points, and lines and regions that you can work with.

I'm going to go with the basic map gallery here and use USA by State Inset. Click Next. I get a few options about just positioning the map information if I want to. Zooming in or out. There's an option at the bottom here to even add a Bing Maps layer, which will underlay the map with either road or aerial or a hybrid version. It looks interesting, but I really don't need that right now, so I am going to uncheck that box and just use a normal map, and click Next here. This next section of the map visualization is somewhat deceptive.

At first, it might look like picking a color palette for a chart, but it's very different. If I use the Basic Map option, all I am really going to add is the spatial data. It's just the map, but nothing about the map. If, on the other hand, I choose the Color Analytical Map or the Bubble Map, it's going to ask me for a source of analytical data. What's important about this map? What am I trying to show about the individual states on it? Now, I actually don't have a dataset yet. The dataset would be my analytical data. So I am just going to choose Basic Map so we can step all the way through this.

Just like working with charts or tables, we have the Color Theme options here. There is a checkbox to change this into a single color map, which sometimes works well and sometimes doesn't. I am just going to go ahead and click Finish. That's now added to my report. And while I can go ahead and run this, it's not going to do anything. We might have the map, but we have no descriptions of anything important about the map. We have no analytical data. Now, there's a couple of ways this can be added. If I've already added the map here, what you can start doing is adding more layers over the top of it.

By clicking the map and clicking again, you'll get the pop-up window very similar to working with charts or sparklines, where it shows that right now I have one layer on this map, and I can use these options at the top to create a new layer, which will again ask me for spatial data and/or analytical data. If, on the other hand, I wanted to specifically add analytical data to this map, I can do that as well. Right-clicking the layer will allow me to bring up an option for Layer Data, and in there I can provide a dataset of analytical data.

Could do it that way. I'm not going to. I am actually going to use the wizard all the way through. I am just going to cancel out of that, but we need some analytical data first, which means create a dataset. I will add a normal dataset; there is nothing magical about this one at all. I am going to connect to AdventureWorks. I had a data source defined earlier. And in my Query Designer, I'm going to drill down into Sales, into Views, into the vIndividualCustomer, and all I'm going to look for here is the StateProvinceName, and one other column. I will go with BusinessEntityID.

Now, if I run that query, what I'm seeing here is things like New South Wales, British Columbia, Seine Saint Denis, Hamburg. Okay, I'm going to put a filter on this to only bring back the US ones, because I am going to map this to the United States map. So I will add a filter to this query. I am going to filter on CountryRegionName. I know from looking at this data that that is United States. And that needs to be an is and not a like. Go ahead and run this query. And now what I'm getting back are various state province names, California, Washington quite heavily involved there, with just a Business Entity ID that I don't really care about.

As far as I'm concerned, I'm done. This is my dataset. It has all the data that I will need for this map. Rather than add this as an analytical source of data, I am actually just going to run through the wizard again, because it's always good to look at it once or twice. So I am going to select the map, delete it, and we're going to add a new map here. Back to the Insert Tab, add the Map Wizard. Once again, I'm going to use the Map Gallery. My spatial data will just be the built-in USA by State Inset. I will click Next. I don't need to make any changes here. I will click Next again.

This time around, I could choose Color Analytical or Bubble Map. I am going to go with Bubble Map. But by selecting that, the very next thing it's going to ask me for here is to choose the analytical dataset. Okay, I want to represent some information on this map. Where is the information? So I am going to choose this dataset that I just created. It has a list of city names. I am going to ask the map to count them up and to represent them properly. Selecting that, click Next. Now comes the important part. Here is how we tie together our spatial and our analytical data, to match up the information in our normal dataset so it shows up in the right place in our spatial data, in our map.

It might look confusing. It really isn't. This middle section contains data that's already in the map. It's already in our spatial data. We have the STATEFP, which is the FIPS code, the Federal Information Processing State code. We have the USPS abbreviation, and we have State Name. All those options are available, built into the map itself. What I need to do is figure out what's in my analytical data that I can map this to. I can see that really StateProvinceName needs to connect to STATENAME. So that's what I am going to select is the Match field.

Check the checkbox here that STATENAME in the Spatial dataset connects to StateProvinceName in my Analytical dataset. Now, click Next. It's going to ask me for the color theme and visualization. I'm going to select the Generic option. Because I picked a bubble map, it's asking me, do I want to use bubble sizes to visualize data? And yes, I actually do. I want to have a bubble that represents customer count in every particular state. So, with that checked, it's asking, what data am I representing? And I need to click the dropdown because what I want it to do is do a count of the Business Entity IDs, just count up all the companies that came back for that particular state.

I don't care what any particular Business Identity ID is; I just want a count of all of them. So I will do that. And below this, there is an option to display labels. I don't have to have that, but I find it useful. But I would want the labels to have the same information, which is count of business entity ID, and I'll click Finish. Giving myself a little more room on this report, we'll go ahead and run it, and there is our map. And it's immediately obvious where the AdventureWorks customers are primarily distributed, all along the west coast here.

Over 4,000 customers in California, 1,000 in Oregon, 2,000 in Washington, with just a smattering of others all over the rest of the US. So this can immediately give us a view of the data that's much more intuitive than looking at long lists in a table, which is the only way we would have been able to get this before. Getting more advanced, you can create your own spatial datasets to overlay lines and regions on top of this, but that is beyond the scope of this course. So hopefully, this will get you moving on the most common tasks with maps.

There are currently no FAQs about SQL Server Reporting Services in Depth.

 
Share a link to this course

What are exercise files?

Exercise files are the same files the author uses in the course. Save time by downloading the author's files instead of setting up your own files, and learn by following along with the instructor.

Can I take this course without the exercise files?

Yes! If you decide you would like the exercise files later, you can upgrade to a premium account any time.

Become a member Download sample files See plans and pricing

Please wait... please wait ...
Upgrade to get access to exercise files.

Exercise files video

How to use exercise files.

Learn by watching, listening, and doing, Exercise files are the same files the author uses in the course, so you can download them and follow along Premium memberships include access to all exercise files in the library.
Upgrade now


Exercise files

Exercise files video

How to use exercise files.

For additional information on downloading and using exercise files, watch our instructional video or read the instructions in the FAQ.

This course includes free exercise files, so you can practice while you watch the course. To access all the exercise files in our library, become a Premium Member.

join now Upgrade now

Are you sure you want to mark all the videos in this course as unwatched?

This will not affect your course history, your reports, or your certificates of completion for this course.


Mark all as unwatched Cancel

Congratulations

You have completed SQL Server Reporting Services in Depth.

Return to your organization's learning portal to continue training, or close this page.


OK
Become a member to add this course to a playlist

Join today and get unlimited access to the entire library of video courses—and create as many playlists as you like.

Get started

Already a member?

Become a member to like this course.

Join today and get unlimited access to the entire library of video courses.

Get started

Already a member?

Exercise files

Learn by watching, listening, and doing! Exercise files are the same files the author uses in the course, so you can download them and follow along. Exercise files are available with all Premium memberships. Learn more

Get started

Already a Premium member?

Exercise files video

How to use exercise files.

Ask a question

Thanks for contacting us.
You’ll hear from our Customer Service team within 24 hours.

Please enter the text shown below:

The classic layout automatically defaults to the latest Flash Player.

To choose a different player, hold the cursor over your name at the top right of any lynda.com page and choose Site preferencesfrom the dropdown menu.

Continue to classic layout Stay on new layout
Exercise files

Access exercise files from a button right under the course name.

Mark videos as unwatched

Remove icons showing you already watched videos if you want to start over.

Control your viewing experience

Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.

Interactive transcripts

Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.

Are you sure you want to delete this note?

No

Thanks for signing up.

We’ll send you a confirmation email shortly.


Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

Keep up with news, tips, and latest courses with emails from lynda.com.

Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

   
submit Lightbox submit clicked
Terms and conditions of use

We've updated our terms and conditions (now called terms of service).Go
Review and accept our updated terms of service.