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

SQL Server Reporting Services in Depth

Applying interactive sorting


From:

SQL Server Reporting Services in Depth

with Simon Allardice

Video: Applying interactive sorting

I have a typical table here, which right now has an internal sort applied to it to sort by last name descending. And I want to be able to click in these header areas and have this toggle ascending or descending by first name, or ascending and descending by last name. I could apply that ability to the rowguid as well, but that's probably not very useful. You don't have to apply interactive sorting on all the columns. It's completely up to you. But here's how we'd add interactive sorting to a typical table. I'll switch back into Design view. Now, here's the thing.
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

Applying interactive sorting

I have a typical table here, which right now has an internal sort applied to it to sort by last name descending. And I want to be able to click in these header areas and have this toggle ascending or descending by first name, or ascending and descending by last name. I could apply that ability to the rowguid as well, but that's probably not very useful. You don't have to apply interactive sorting on all the columns. It's completely up to you. But here's how we'd add interactive sorting to a typical table. I'll switch back into Design view. Now, here's the thing.

Interactive sorting is very easy to add, as long as you know the right place to add it. The first couple of times you do it it can seem a little tricky to find the right place so that the correct option will appear. So, I'm wanting to click on the words First Name or Last Name to apply that sort order, but the way to do it is to make sure we're adding that interactive sorting feature to the text box here, not to the text inside the text box. Now, what do I mean by that? Well, as you have probably seen, when you start clicking around different elements on a report, that the selected option of this Properties window will change based on what you've clicked on.

So if I click on a blank area of the report, I see the word Body appear, and I can change the properties of the body of the report. If I click on that top corner of the table, I'll see the Tablix properties appear. But if I'm interested in this area, the blue area this says First Name, the header of this column, well, there is a difference between having the text selected, in which case I'll see selected text over here in the Properties window, and having just the text box selected, which I can get if I click a blank area. There I'll see Textbox2.

So there is a difference between the text box and the text inside it. If I just have text selected and click the Properties pane, I can affect the properties of that text. I have four sections here, and that's fine. But if I have a text box selected and click its Properties Pages, I have more properties and more interesting properties. So first, how do I make sure that I have the actual text box selected? Well, there is a couple of different ways. If you have the actual text selected, the first clue is click in a blank area of the report somewhere, and then to select the text box, click in it but try not to be over the actual text of the time.

So if here I just click on the background then I can see I have TextBox2 selected. And this works both for something inside a table and for something like a title. We've got the sorting data title here. If I click inside the text, I get selected text; click off on a blank area and then click back in the general region of it, I'll see the actual ReportTitle text box. Now, if you have a very compact report where a lot of the columns have been closed up to each other it might be very difficult not to click text. So here is another way you can do it. So if I have this text selected, what that means is I have text selected that's inside a text box, that's inside the table, that's inside the body of the report.

Well, I can use the Escape key to drill up from the lowest level to the highest level. So if I look at the fact I have got selected text here, if I hit the Escape key once, I jump up to the text box. If I hit the Escape key again, I jump up to the table, the Tablix element. If I hit the Escape key again, I'll jump up to the body level. We want to make sure we're on the text box. Finally, got it. We're good. Let's go. With the text box selected, I open up the Property Pages and there is an option here called Interactive Sorting. All we do is check the checkbox. Yes, I want to enable it on this textbox.

Well, what do we want to sort? Well, Detail rows is the option here. I haven't applied any grouping to this table so that's not relevant. But if you did have a grouped table, you could apply it to your groups here. Now, what do I want to sort by? Well, this is clicking on FirstName, so I'll sort by FirstName. The option underneath is to apply this sorting to all groups and data regions. It simply means if you have multiple tables all showing similar data, do you want any of the sorting to apply to all of those table? Well, we only have one so this isn't relevant here.

And I'll just click OK. It doesn't seem to have made a difference, but it will when we run this. Well, I'm also going to do this on the Last Name column as well. So again, clicking a blank area of this, double-checking that I can see the highlight around the text box, and that I see TextBox selected here in Properties, open up pages, jump to Interactive Sorting, enable interactive sorting, and Sort by LastName. Click OK, Done. Now we go ahead and run this. And what it's done is add the little up-down arrows to both of these areas.

It's actually still applying my default sort order that I had on the table, which was last name descending, but now we have interactive sorting that'll override that. So I can click on First Name, sort ascending, click it again, sort descending, click on Last Name, sort ascending, click it again, sort descending. And that's how you add interactive sorting to your tables.

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

Share a link to this course
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.

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
Welcome to the redesigned course page.

We’ve moved some things around, and now you can



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.

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