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 Apr 19, 2005

MSSQL Server Reporting Services: Black Belt Components: Ad Hoc Sorting with Parameters - Page 5

By William Pearson

Enhance the Territory Sales Drilldown Report Structure to Meet Business Requirements

Let's open the new clone of the Territory Sales Drilldown report, and begin our alterations, focusing upon the conditional sorting considerations that form the nucleus of our session. We will first create the parameter structures to support the required ad hoc sorting capabilities, and then we will make modifications to the affected data region of the report itself to complete our enhancements.

1.  Double-click AdHocSort_Territory Sales Drilldown.rdl, within the Reports folder in Solution Explorer, to open it in Report Designer.

The report opens, displaying the report on the Layout tab.

2.  Select Report --> Report Parameters from the main menu, as depicted in Illustration 18.


Illustration 18: Select Report --> Report Parameters from the Main Menu

The Report Parameters dialog appears.

3.  Click the Add button in the lower left corner of the dialog.

A new parameter with default name appears.

4.  For the dialog boxes shown in Table 1, type the corresponding items (replacing defaults where required):

In this Dialog Box:

Type the following:

   
 

Name:

SortSelection

   
 

Prompt:

Sort Upon:

 
 

Data type:

String

   

Allow Blank Value:

Unchecked

   

Available Values:

 

Non-queried

   

Label Row 1:

Total Value

Value Row 1:

TotalDue

Label Row 2:

Sales Order No.

Value Row 2:

SalesOrderNumber

Default Values:

Non-queried

   

Value:

TotalDue

   

Table 1: Sort Selection Parameter Settings

The completed Report Parameters dialog for the sort selection parameter appears as shown in Illustration 19.


Illustration 19: Completed Report Parameters Dialog for Sort Selection

This provides us with the parameter we need for the sort selection. Next, we need to create a parameter whereby we can specify the sort direction. We will do this with the following steps:

5.  Click the Add button in the lower left corner, once again.

A new parameter with default name appears.

6.  For the dialog boxes shown in Table 2, type the corresponding items (replacing defaults where required):

In this Dialog Box:

Type the following:

   
 

Name:

SortAscOrDesc

   
 

Prompt:

Ascending or Descending?

 
 

Data type:

String

   

Allow Blank Value:

Unchecked

Available Values:

 

Non-queried

   

Label Row 1:

Ascending

Value Row 1:

Asc

Label Row 2:

Descending

Value Row 2:

Desc

Default Values:

Non-queried

   

Value:

Desc

   

Table 2: Sort Direction Parameter Settings


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