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 Sep 23, 2008

Mastering OLAP Reports: Parameterized Grouping - Page 7

By William Pearson

Add a New Dataset to Support the Proposed Report Parameters

Now we will add a new dataset to support the proposed parameter picklists (the parameter selections that the information consumers see at report run time).

1.  Click the Data tab, once again.

2.  With the Dataset selector, select <New Dataset ...>, as shown in Illustration 28.

Illustration 28:  Select <New Dataset ...>
Illustration 28: Select <New Dataset ...>

The Dataset dialog opens, defaulted to the Query tab.

3.  Type the following into the Name box :

RowGroup

4.  In the Data source box just below, select AdventureWorks (shared).

5.  In the Query string box, type (or cut and paste) the following query:

SELECT 
   'Product Category' AS ParameterCaption, 
   'Category' AS ParameterValue
UNION
SELECT 'Product Subcategory'  AS ParameterCaption, 
 'Subcategory' AS ParameterValue
UNION
SELECT 'Product'  AS ParameterCaption, 
 'Product' AS ParameterValue

The Dataset dialog appears, with our input, as depicted in Illustration 29.

Illustration 29:  The Dataset Dialog with Our Input ...
Illustration 29: The Dataset Dialog with Our Input ...

6.  Click OK to accept our input and to dismiss the Dataset dialog.

We are taken to the Query pane, where our newly crafted query appears as shown in Illustration 30.

Illustration 30:  Our Query in the (Partially Depicted) Query Pane
Illustration 30: Our Query in the (Partially Depicted) Query Pane

7.  Click the Run (!) button to test the query.

Data is returned, and appears in the Data Pane as depicted in Illustration 31.

Illustration 31: Data is Returned and Appears in the Data Pane
Illustration 31: Data is Returned and Appears in the Data Pane

We will see how the ParameterCaption and ParameterValue fields are employed when we set up the two report parameters in the steps that follow.



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


















Thanks for your registration, follow us on our social networks to keep up-to-date