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 Jan 31, 2008

Parameter Support Objects, Pt II: Support OLAP Parameter Defaults with Datasets - Page 4

By William Pearson

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

Let’s 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 client’s 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.



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