Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member

Creating a column chart

From: SQL Server Reporting Services in Depth

Video: Creating a column chart

I am going to begin with a column chart. This might not always be the one that you want, but it's a great one for getting to grips with how to create charts in Reporting Services. And just to save some time, I'm starting here with a blank report where I've defined a data source pointing to the regular AdventureWorks database-- not the LT or DW one, just the regular one. So, the next thing I need to do is create a dataset. I am going to create one called SalesInfo. It will be embedded in a report, and I will select the AdventureWorks data source. Jumping into Query Designer, what I'm going to do is start drilling down into this database. I am going to go in to the Sales section.

Creating a column chart

I am going to begin with a column chart. This might not always be the one that you want, but it's a great one for getting to grips with how to create charts in Reporting Services. And just to save some time, I'm starting here with a blank report where I've defined a data source pointing to the regular AdventureWorks database-- not the LT or DW one, just the regular one. So, the next thing I need to do is create a dataset. I am going to create one called SalesInfo. It will be embedded in a report, and I will select the AdventureWorks data source. Jumping into Query Designer, what I'm going to do is start drilling down into this database. I am going to go in to the Sales section.

But instead of going into Tables, I am going to go into Views, because there are some views in the AdventureWorks database that have already been predefined to join several tables together to provide some useful information. What I'm interested here is a view called vSalesPerson. This has already been configured that it can give me the information about each particular salesperson and the total number of sales they did this year versus last year. So, I am going to select the last name and then down here, SalesYTD and SalesLastYear.

Go ahead and run the query, just to test that. And it looks good. Now, as ever, I'm not focusing on this particular structure of this view in the AdventureWorks database. That's of no interest to me. I'm trying to point out that if you have data that is something like this, here's what you might do with it. Because we could just show this in a regular table data region on our report, but it would be hard to easily see what's going on. It's just a bunch of numbers. You can't scan it and see which one is bigger than the next one. You have to read it a little closer. So a chart will be useful here.

I am going to click OK and say that's my dataset, and then over to the Insert tab. I am going to find the Chart Wizard. In the next example, I'll use the Insert Chart option, but we will go with the Wizard for now. The Wizard doesn't really do an awful lot. First thing it's going to ask is, what dataset do you have? And of course, it's the SalesInfo one I just made. Click Next. I'm going to do a Column chart. Click Next. And then we have this page that looks very similar to creating a table or a matrix data region. And in fact, it is almost identical.

The pieces that I'm most interested in are what goes in the Values section and what goes in the Categories section. Values typically being the actual number that we are interested in, how we can compare something being greater than or less than something else. So what I am going to do is drag across SalesYTD into the Values section. But we are also interested in grouping, in categorizing the stuff. Well, I am going to do it simply by last name. This will give me a chart that will allow me to compare the values in a graphical fashion.

We will do something with SalesLastYear a little bit later on in this example, but for now, that will do. I will click Next. In the Style section, I will just select Generic. I don't need all the extra styling. This will do, for our purposes, and click Finish. I will just drag that a little wider, and just give it a simple title. Now, when you're looking at a chart in Design view, this is dummy data. It's not real data. To see the real data, we need to go ahead and run it. So I will do that now. There's our chart. It doesn't look great.

A few too many data points, a few too many people. I could change this by going back into Design view and actually just making it bigger. I could grab the chart and then grab the drag handle, drag it down, drag it to the right. But regardless, I've probably got a few too many data points if what I am wanting to do is actually compare salespeople in some meaningful fashion. Well, let's say that what I really wanted to see was the top 25% of my salespeople, to compare them. Now, I could do this a couple of different ways. I could go back to my dataset and change that so it only returns a few rows with the top sales numbers. Or I could apply a filter on the chart itself.

I am actually going to do it on the chart. So, we need to get into the properties of this chart after it's already been positioned in our report. This is another area where you have to be a little bit careful on what you've clicked on, because it's very easy to, say, click the Chart Title area where you have selected the title, not the chart. You will find that there are multiple pieces in here. We've got the Legend over here on the right-hand side. We've got Axis Title areas and information down on the left and on the bottom. So you need to be careful what you have selected. The best way to grab the chart is to click in a blank area just around here.

And what we're looking for is that Chart is being selected over in the Properties window. Again, another option you could do is if you have something selected like the Legend, I can then also hit the Escape key until I see the word Chart there representing yes, I actually am on the chart, not on a piece of text. Now, there's a couple of ways I can get to the properties of this. I could right-click an area here, but it's sometimes easy to miss the right spot. So, with the chart selected, I can also open up the Property pages from this section. Here we have some basic information, like the name of this chart, the visibility of it, and we have the Filters section.

I am going to add a filter in here to only include rows where the following conditions are true. What I'm interested in is where the Sales YTD are equal to-- well, I don't want an equal to; what I actually want is the top 25%. And I'll let it take care of selecting the right amount of rows here. Click OK. It doesn't change anything visual about the chart, but when we run it again, we have a much more straightforward list. We've now got five people that we are comparing and we can actually see all their individual names here.

But really, what I was more interested in is not just sales year to date; I can now see quickly how one person compares to another, but I also want to see how they compare to the sales last year. Well, I'll go back into the Design view. This is going to be another grouping, another category. We could have done it in the wizard, but we are out of the wizard. We can't go back into the wizard. So, here's how we would make a change to a chart after it's been positioned on the report. Now, you might first think, well, it's by selecting the chart and going back into those Property pages.

But no, that's not the way we do it. You might think that it's in the Property window itself. And no, it's not really there either, or not in any easily accessible fashion. Or you might also think, well, if I right-click an area of the chart, is it here? Actually, no, it's not in any of those places. But if you right-click the chart so you see the Chart dropdown here, what will also happen is over here on the right-hand side, you will have this other pop-up called Chart Data. You've got to be careful with this one because it's very common to have this hidden behind the Properties window or sometimes even moved off the right hand entirely just because you can't see that area of the Design layout.

But that's where you should find it, on the right-hand side of the chart itself. This is what is currently showing, the things that we had dragged into the right areas in the wizard: our values, which are chart Sales Year To Date, and our first category grouping, which was LastName. Well, all I'm going to do now is grab the SalesLastYear part of the dataset over here in my report data, drag it over into the Values section, and say that it's another bunch of values that I'm interested in. And Report Builder will take care of grouping everything in the right place.

It will take care of giving it a different set of colors. So, I will go ahead and click Run. And now we have the two sets of columns. We have the Legend being automatically generated over on the right-hand side, so it's very easy to scan, very easy to look at. And once we're happy with just being able to select the right part of the chart to figure out where the actual correct properties are, when we should be right-clicking and selecting the property pages, and when we should be moving over to the right-hand side of this layout so I can actually look at the chart data, there's a lot of things you can do with it.

Now, one of the options which you won't see in chart data but you will see just by right-clicking the chart itself--and again make sure you're right-clicking a blank area of the chart-- is the Change Chart Type. And I wanted to show this with the idea that even after we've configured it, I could change it from one to another. So, for example, we're currently a basic column chart, but I am going to come down and select one of the bar chart options, perhaps even the 3D clustered bar. Click OK. Now, we are actually done here, because it kept all the configuration that was already in there.

We are showing the same information, using the same dataset, and representing it with the same color. Bar and column charts, very similar to each other, bar charts just horizontal. Both of these are very easy to configure, and great to show direct comparisons.

Show transcript

This video is part of

Image for SQL Server Reporting Services in Depth
SQL Server Reporting Services in Depth

40 video lessons · 9834 viewers

Simon Allardice
Author

 
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

Start learning today

Get unlimited access to all courses for just $25/month.

Become a member
Sometimes @lynda teaches me how to use a program and sometimes Lynda.com changes my life forever. @JosefShutter
@lynda lynda.com is an absolute life saver when it comes to learning todays software. Definitely recommend it! #higherlearning @Michael_Caraway
@lynda The best thing online! Your database of courses is great! To the mark and very helpful. Thanks! @ru22more
Got to create something yesterday I never thought I could do. #thanks @lynda @Ngventurella
I really do love @lynda as a learning platform. Never stop learning and developing, it’s probably our greatest gift as a species! @soundslikedavid
@lynda just subscribed to lynda.com all I can say its brilliant join now trust me @ButchSamurai
@lynda is an awesome resource. The membership is priceless if you take advantage of it. @diabetic_techie
One of the best decision I made this year. Buy a 1yr subscription to @lynda @cybercaptive
guys lynda.com (@lynda) is the best. So far I’ve learned Java, principles of OO programming, and now learning about MS project @lucasmitchell
Signed back up to @lynda dot com. I’ve missed it!! Proper geeking out right now! #timetolearn #geek @JayGodbold
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.


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.

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

Your file was successfully uploaded.

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.