Viewers: in countries Watching now:
In SQL Server 2008 Essential Training, Simon Allardice explores all the major features of SQL Server 2008 R2, beginning with core concepts: installing, planning, and building a first database. Explore how Transact-SQL is used to retrieve, update, and insert information, and gain insight into how to effectively administer databases. The course also covers features outside SQL Server's database engine, including technologies that have grown up around it: SQL Server Reporting Services and Integration Services. Exercise files are included with the course.
If you want to get even more graphical, we can add a chart to our reports. Now I'm going to add a chart. This can either come before our table here or afterwards. I'm going to put it afterwards. I'll click Insert and then if you notice, we have a Chart option here. We can directly insert it and then format it, or the Chart Wizard will help us through some of that. So the question is, is the data that we want on the chart already in the data set, and let's say for our purposes it will be. What I'm going to do is show a bar chart of the sales that we've made based on the Region or the Province that we've done it in.
I'm going to click Next, and it will ask is it a Column, is it a Line, is it a Pie, and this of course is going to be a choice that you'll make more based on what the data actually is and how many data points you're expecting to have. The best thing is just experiment with these. Try several different ones. I'm going to pick a Column to begin with, and click Next. What it's telling me is there are my available fields and I can give it Categories and Values and a Series that read up at the top. What it's telling you is a field in the Categories list is displayed on the x-axis.
A field in the Values list shows aggregated data on the y-axis and it'll take care of aggregating or grouping it together. I'm not going to bother creating a new series in the chart, what I want is for the StateProvince to be in the Categories section across the x-axis and then I'm going to have the TotalDue aggregated in the y-axis. I'll click Next, then it gives me the same choice I got for the table, what style would you like. I think we chose Slate for the last one, so I'll choose it for this one and click Finish.
And the Chart is inserted, although it's kind of overlapping my table, and it looks as if I was going to drag it below that I'd kind of drag it off the bottom of the screen. But I don't have to worry about that. If I just keep dragging it down, what you'll find is the page itself will expand, even expanding the footer here. So what I really need to do is just drag it to underneath my table, because the table itself will expand. Now I'll drag it wide to fit the width of the page and that should do.
I can come in and give it a Chart Title. Let's call it Sales By Region. Now we've got the Axis Titles that we could do here, which is let's say Dollars Amount and the region across the bottom. And let's try this. Click Run. We get our normal part of the report coming back. These are what have listed by the States and Provinces. We are across multiple countries, so it can end up being a little weird. So we are obviously getting places like England as the country and then California is the state, but that's all based on how your database is setup.
If I come down, what I can actually see is here's the chart and it appears that we've got California with the certain amount. Notice that if I move my mouse over the top of it, I'll actually get that amount and same with England. In this case, it's aggregating the TotalDue up and then showing lesser amounts as well for Colorado, Nevada, and New Mexico and Utah. So, very easy process of adding a chart. If you select the chart in your Design view, you will find that it itself has a lot of properties that you can start to mess around with.
Any of the individual bars can be affected. When you select these you'll also find again the little pop-up menu here that would allow you to jump back in and change more of the properties of the chart itself. Again, your choice of what kind of job that you're going to insert is really going to be much more based on the available data that you have, but the process for adding them is the same as this.
Find answers to the most frequently asked questions about SQL Server 2008 Essential Training .
Here are the FAQs that matched your search "" :
Sorry, there are no matches for your search "" —to search again, type in another word or phrase and click search.
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.