Procedure: Enhance the Report per the Business Requirements
Add a Multivalue
Parameter for Sales Territories to the Report
will add parameterization (with multivalue
input capabilities) for Sales Territory Groups before making further
structural changes to support the more involved business requirements described
by the client representatives.
Click the Data
tab for the report.
arrive at the Data view, where we see the ProductData Dataset
open in Design Mode, as shown in Illustration 10.
NOTE: If the Data tab opens with another Dataset,
or if it opens in Query Mode, make the necessary changes in the DataSet
selector and / or the Design Mode toolbar button, respectively, as
Click the "Click
to execute the query" link (in the middle of the Results pane) to
populate the Results pane.
pane appears as depicted in Illustration 11.
Select Sales Territory in the Dimension selector,
underneath the Product selection already in place, within the Filter pane
atop the Results pane, as shown in Illustration 12.
Territory Group in the Hierarchy selector, to the immediate right of
the Dimension selector within the Filter pane.
in the Operator selector, to the immediate right of the Hierarchy
Check the All
Sales Territories checkbox within the Filter Expression selector, to
the immediate right of the Operator selector, as depicted in Illustration
Illustration 13: Select All Sales Territories
within the Filter Expression Selector ...
on the Filter Expression selector to accept our selection and close the
checkbox in the Parameters column of the Filter pane, to the
immediate right of the Filter Expression selector.
we have selected to parameterize the query for Sales Territory Groups, Report
Designer will automatically create the components we need to support the
parameterization we have requested. Among the components created are a Dataset
to support the Sales Territory Group parameterized filter, as
well as the Report Parameter that goes along with the new Sales
Territory Group parameter. The Sales Territory Group Dataset
is actually used in conjunction with the Report Parameter to populate
the runtime picklist that appears when we execute the report.
prepare to observe the very act of creation of these components within Report
Designer, by taking the following steps.
--> Report Parameters from the main menu, as shown in Illustration
Illustration 14: Select
Report --> Report Parameters ...
Parameters dialog opens. We see a single parameter listed, the ProductCategory
parameter, as presented in the partial dialog depicted in Illustration 15.
Illustration 15: Single
Parameter Initially Appears ...
to dismiss the Report Parameters dialog.
downward arrow on the Dataset selector for the report file.
note that two Datasets appear, ProductData and ProductList,
as shown in Illustration 16.
Illustration 16: Two
Pre-existing Datasets Appear ...
next step, shifting to Layout view, will trigger the creation of a new Report
Parameter as well as a new supporting Dataset, as we shall see in
the following steps.
Click the Layout
tab to shift to Layout view.
--> Report Parameters from the main menu, once again.
Parameters dialog opens. This time, we see that a second Report Parameter
has been created.
Click the new Report
Parameter within the Parameters list (on the left side of the
new SalesTerritorySalesTerritoryGroup parameter, appears as presented
in the partial dialog depicted in Illustration 17.
Illustration 17: The New
Parameter in the Report Parameters Dialog (Partial View)
to dismiss the Report Parameters dialog.
Click the Data
downward arrow on the Dataset selector for the report file, within the Data
view, as we did earlier.
note that three Datasets now appear. A new Dataset, SalesTerritorySalesTerritoryGroup,
has joined the two pre-existing Datasets, as shown in Illustration 18.
Illustration 18: The New
Dataset Appears in the Selector ...
Select the new
Dataset within the Dataset selector.
Execute Query button in the toolbar atop the Data view to populate
the Results pane.
Click the Refresh
fields button to refresh the Dataset fields.
new Dataset populates the Results pane, which appears as depicted
in Illustration 19.
Illustration 19: The New
Dataset Appears ...
verified that the support components have been automatically set up for us, let's
preview the report to see the new Report Parameter in action.
Click the Preview
report executes, with the defaults for the Report Parameters (All Sales Territories for the new Sales Territory
Group parameter) in place. The report appears as shown in Illustration
Illustration 20: The
Report, Executed with Default Parameters
take a look at the effects of selecting a couple of the Territory Groups
within the Sales Territory Group parameter (we will leave the Product
Category parameter at default it really doesn't concern us at present).
and North America (and deselect All Sales Territories) within the Sales Territory
Group parameter, as depicted in Illustration 21.
Illustration 21: Select
Europe and North America Sales Territory Groups
Click the View
report executes, and then appears as shown in Illustration 22.
The Report, Executed with New Parameters
that the report has contracted in width, displaying only the selected Sales Territory
Groups, Europe and North America, as we requested. We have therefore verified the
effectiveness of the multivalue Report Parameter within its "typical"
use for a matrix data region: the columns of the matrix data region
"adjust" to reflect the choices within the Report Parameter.
This illustrates one of the primary advantages in using a matrix data region
in conjunction with a multivalue Report Parameter.
client has requested something a little more innovative, however. In the next
section, we will extend our work so far, to enable our report to generate a complete, standalone "report"
(with separate row and column axes) to appear for each of the Sales
Territory Groups selected within the new Report Parameter.
--> Save All from the main menu, to
save our work to this point.