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