Procedure:
Align the Value Columns within the Parameter Default Support Dataset to the
Respective Default Values Settings within the Report Parameters Definitions
Having
created a dataset to feed the parameter defaults, we will next go
to the Report Parameters dialog to make the necessary alignments to
entrain the individual default value data fields to the perspective default
value selectors.
1.
Click the Layout
tab to transit to Layout view.
2.
Select Report
-> Report Parameters from the main menu.
3.
Select DateCalendarYear
within the Parameters list of the Report Parameters dialog that
appears next.
4.
Within the Default
values section in the lower third of the dialog, ensure that the From
query radio button is selected.
5.
Within the top
of the two settings that appear within the Default values section, Dataset,
select the new DefaultDateSupport dataset.
6.
Within the Value
field selector just underneath the Dataset selector, select YearParamDefaultValue.
The Report
Parameters dialog appears, with our adjustments highlighted, as depicted in
Illustration 8.
Illustration 8: Our
Settings for the DateCalendarYear Report Parameter
We will next
follow the same steps for each of the Quarter and Month Report
Parameters.
7.
Select DateCalendarQuarterofYear
within the Parameters list of the Report Parameters dialog.
8.
Within the Default
values section in the lower third of the dialog, ensure that the From
query radio button is selected.
9.
Within the top
of the two settings that appear within the Default values section, Dataset,
select the new DefaultDateSupport dataset.
10.
Within the Value
field selector just underneath the Dataset selector, select QtrParamDefaultValue.
The Report
Parameters dialog appears, with our modifications, as shown in Illustration
9.
Illustration 9: Our
Settings for the DateCalendarQuarterofYear Report Parameter
All that
remain are the same steps for Month Report Parameter.
11.
Select DateMonthofYear
within the Parameters list of the Report Parameters dialog.
12.
Within the Default
values section in the lower third of the dialog, ensure that the From
query radio button is selected.
13.
Within the top
of the two settings that appear within the Default value section, Dataset,
select the new DefaultDateSupport dataset.
14.
Within the Value
field selector just underneath the Dataset selector, select MonthParamDefaultValue.
The Report
Parameters dialog appears, with our adjustments, as depicted in Illustration
10.
Illustration 10: Our
Settings for the DateMonthofYear Report Parameter
We are
now ready to leave the Report Parameters dialog.
15.
Click OK to
accept our settings, and to dismiss the Report Parameters dialog.
Verification: Preview the Report and Inspect the Effectiveness of Our Solution
Lets
preview the report to inspect the results of our handiwork.
1.
Click the Preview
tab.
DBJ_OLAP_Report.rdl initializes, and the prompts (including
the pre-existing ProductCategory parameter), become enabled.
2.
Select All
Products among the multiple options in the Product Category dropdown
selector, as shown in Illustration 11.
Illustration 11: Select
All Products at the First Prompt ...
We see
that the Calendar Year, Calendar Quarter and Month are
populated with CY 2004, CY Q3, and July, respectively, as
depicted in Illustration 12.
Illustration 12: Defaults
Appear within the Time-related Parameter Picklists
These
are, in fact, the last member of each Date dimension (Calendar
hierarchy) level containing data in the sample cube.
3.
Click the View
Report button.
The
report executes quickly and returns the data for the selections we have made
within our parameter picklists, in a manner similar to that shown in Illustration
13.
Illustration 13: The
Sample Report Operates as Expected with New Date Parameter Defaults
Our
verification process has demonstrated the effectiveness of our solution. (As a
further test, we can select August (the last Month option) within
the Month selector and re-run the report. No results are returned.) Our client colleagues express
satisfaction with, and understanding of, the steps we have taken and the
results we have obtained, and state that they will be able to extend the
concepts to other reports. We have also noted that the Reporting Services
2005 environment, along with the integrated Microsoft business intelligence
solution as a whole, supports flexible design of parameter picklist default
support at multiple places within each of the database, Analysis
Services, and Reporting Services layers.
We
will extend our examination of parameterization yet further in subsequent
articles.
4.
Experiment
further with the report, if desired.
5.
When ready,
click the Layout tab.
6.
Select File
-> Save DBJ_OLAP_Report.rdl As ... to save our work, up to this
point, to a location where it can be easily accessed, if useful.
7.
Select File
-> Exit to leave the design environment,
when ready.
Conclusion ...
In
this article, we continued the extended examination of Parameters in Reporting
Services that we began in Mastering
OLAP Reports: Parameters for Analysis Services Reporting, Pt. I, Mastering
OLAP Reports: Parameters for Analysis Services Reporting, Pt. II, and which we continued in the first half of this article, Customize
Automatically Created Parameter Support Objects Pt. I. Continuing to work with the basic OLAP report we created in Pt. I, we established a scenario within which we exposed the steps
involved in meeting a basic need of a hypothetical client in adding runtime defaults
that appear within the parameter picklists of the report.
In
examining the requested addition of parameter defaults within an OLAP
report containing a matrix data region, we reopened the sample Report Server project, AdventureWorks
Sample Reports, and accessed the existing sample report we prepared in Pt. I. We then touched upon options for supporting intelligent parameter picklist
defaults among the three primary layers of the integrated Microsoft
business intelligence solution, before focusing upon an approach to meeting the need of
our hypothetical client to present parameter picklist defaults representing
the last periods of data entry within our cube.
We created
a dataset to provide parameter default support in the Reporting
Services layer of the clients BI solution, and then overviewed how the various components of the parameter
default support solution we proposed were tied together, as a part of a hands-on
practice session where we created and aligned the necessary components to
support our parameter defaults. Finally, we previewed the sample report to
observe the effectiveness of our solution in runtime action.
»
See All Articles by Columnist William E. Pearson, III
Discuss this article in the MSSQL Server 2000 Reporting Services Forum.