Database Journal
MS SQL Oracle DB2 Access MySQL PostgreSQL Sybase PHP SQL Etc SQL Scripts & Samples Links Database Forum

» Database Journal Home
» Database Articles
» Database Tutorials
MS SQL
Oracle
DB2
MS Access
MySQL
» RESOURCES
Database Tools
SQL Scripts & Samples
Links
» Database Forum
» Sitemap
Free Newsletters:
DatabaseDaily  
News Via RSS Feed


follow us on Twitter
Database Journal |DBA Support |SQLCourse |SQLCourse2
 

Featured Database Articles

MS SQL

Posted Dec 19, 2005

Interactive Sorting Within Reporting Services - Page 5

By William Pearson

Procedure: Add Support for Interactive Sorting in a Relational Report

Conditional sorting could, of course, be added to our report via the method we undertook in Black Belt Components: Ad Hoc Sorting with Parameters, However, as we have already noted, our specific focus in this section will be the addition of support for interactive sorting through leveraging new properties settings.

Let's open our new report in Layout view and make the necessary settings to support the interactive sorting capabilities requested by the information consumers.

1.  Right-click RS024_Interactive Sort.rdl in the Solution Explorer.

2.  Select Open from the context menu that appears, as shown in Illustration 17.


Illustration 17: Opening the New Report ...

RS024_Interactive Sort.rdl opens in Layout view, and appears as depicted in Illustration 18.

Click for larger image

Illustration 18: Our Report Opens in Layout View ...

Let's preview the report, so as to get a feel for its general operation prior to performing our enhancements.

3.  Click the Preview tab to execute RS024_Interactive Sort.

Execution begins (the report initially executes with the default parameter setting).

The report executes, and appears as shown in Illustration 19.


Illustration 19: The Report Appears Default Parameter Selection ...

We are now positioned to enable the report to support interactive sorting. To do so, we will return to Layout view, and then access the properties settings for the Item Number textbox.

4.  Click the Layout tab.

5.  Right click the textbox containing the label Item Number (the heading for the Item Number column in the report).

6.  Select Properties from the context menu that appears, as depicted in Illustration 20.


Illustration 20: Accessing the Properties for the Item Number Column Heading ...

The Textbox Properties dialog opens.

7.  Select the Interactive Sort tab of the dialog.

8.  Click the check box atop the tab labeled Add an interactive sort action to this textbox.

The checkmark appears in the check box, indicating that interactive sort is enabled.

9.  In the Sort expression box that appears immediately underneath the check box, select the following from the options that appear within the selector:

=Fields!LineTotal.Value

10.  In the section just below the Sort expression box, labeled Data region or grouping to sort, click the radio button labeled Choose data region or grouping.

11.  In the selector just below the radio button, select the following item:

SalesOrderDetail

12.  Leave the radio button to the left of Detail scope, in the section labeled Evaluate sort expression in this scope, at the default, selected setting.

We leave the Detail scope selection in place as we intend only to sort the repeating rows of the data region we have selected. Had the need arisen, we might have specified another data region or group upon which to enact our sorts.

The Interactive Sort tab of the Textbox Properties dialog appears as shown in Illustration 21.


Illustration 21: The Interactive Sort tab...

13.  Click OK to save our settings and to dismiss the Textbox Properties dialog.

We return to the Layout tab, where we are now ready to verify the effectiveness of our modifications.



MS SQL Archives

Comment and Contribute

 


(Maximum characters: 1200). You have characters left.

 

 




Latest Forum Threads
MS SQL Forum
Topic By Replies Updated
SQL 2005: SSIS: Error using SQL Server credentials poverty 3 August 17th, 07:43 AM
Need help changing table contents nkawtg 1 August 17th, 03:02 AM
SQL Server Memory confifuration bhosalenarayan 2 August 14th, 05:33 AM
SQL Server Primary Key and a Unique Key katty.jonh 2 July 25th, 10:36 AM


















Thanks for your registration, follow us on our social networks to keep up-to-date