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 10

By William Pearson

Next, we will add a simple column heading, which we will insert atop the new subgroup label, to make our layout a little more self-explanatory.

23.  Click the Sales Reason textbox to select it.

24.  Right-click the outline that appears, surrounding the box.

25.  Select Copy from the context menu that appears, as depicted in Illustration 43.

Illustration 43:  Copying the Sales Reason Textbox ...
Illustration 43: Copying the Sales Reason Textbox ...

26.  Click into the open space to the right of the Sales Reason label, positioning the cursor approximately as shown with the “X” in Illustration 44.

Illustration 44:  Placing the Cursor for the Paste Operation ...
Illustration 44: Placing the Cursor for the Paste Operation ...

27.  Right-click the canvas where the cursor rests, and select Paste from the context menu that appears, as depicted in Illustration 45.

Illustration 45:  Pasting the Sales Reason Textbox ...
Illustration 45: Pasting the Sales Reason Textbox ...

A second copy of the Sales Reason textbox appears near the drop point.

28.  Align the bottom left corner of the new Sales Reason textbox to rest at the upper left corner of the second row group cell (containing our new input of “=Fields(Parameters!RowGroupBy.Value).Value”), as shown in Illustration 46.

Illustration 46:  Aligning the Copied Sales Reason Textbox as a Label for the Second Row Group
Illustration 46: Aligning the Copied Sales Reason Textbox as a Label for the Second Row Group

29.  Right-click the new Sales Reason textbox copy.

30.  Select Expression from the context menu that appears, as depicted in Illustration 47.

Illustration 47:  Select Expression ... from the Context Menu ...
Illustration 47: Select Expression ... from the Context Menu ...

The Expression Editor opens, once again.

31.  Replace the expression within the upper pane (currently “Sales Reason”) with the following:

=Parameters!RowGroupBy.Label

The Expression Editor appears, with our substituted syntax, as shown in Illustration 48.

Illustration 48:  The Expression Editor with Our Substituted Syntax
Illustration 48: The Expression Editor with Our Substituted Syntax

32.  Click OK to accept our modification, and to dismiss the Expression Editor.

Let’s preview the report at this juncture to confirm that we have taken the steps needed to meet the requirements specified by our client colleagues.

33.  Click the Preview tab, once again.

The two new report parameters appear atop the report, as we noted earlier. This time we will actually make parameter selections and then execute the report.

34.  Select Product within the Group Rows By parameter picklist.

35.  Select Product within the Sort Rows By parameter picklist.

Our selection criteria appear in the parameter selectors as depicted in Illustration 49.

Illustration 49:  Our Test Selections Appear ...
Illustration 49: Our Test Selections Appear ...

36.  Click the View Report button to execute the report.

The Report is being generated message briefly appears, and then we see the report display, similar to that partially shown in Illustration 50.

Illustration 50:  The New Report (Partial View) Generates for the Chosen Parameter Selections
Illustration 50: The New Report (Partial View) Generates for the Chosen Parameter Selections

As we can see, our Product group members appear, in ascending order, as requested. Moreover, our new column label dynamically reflects the selected group, as well. The client representatives express satisfaction with our efforts, and state that, with a few cosmetic changes, the report will be ready for deployment to the targeted information consumer group.

37.  Experiment further with the report, if desired.

38.  When finished with the report, click the Layout tab.

39.  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 for later reference.

40.  Select File -> Exit to leave the design environment, when ready.

Conclusion ...

In this article, we explored a rudimentary approach to the parameterization of grouping within an Analysis Services report containing a matrix data region. Beginning with a discussion surrounding the general concepts of parameterization, we continued into a practice session where we set up a scenario within which we work with a basic OLAP report, to expose the steps involved. In examining the concepts underlying runtime grouping parameterization (along with ad hoc sorting of the selected group’s members) we first described a stated reporting need of our hypothetical client – a need that we would set out to support in our practice session.

We next prepared a copy of a sample report sourced from Analysis Services, making structural modifications to the clone report, to meet peripheral client requests, as well as to prepare for our practice exercise session with parameters surrounding a matrix data region. We modified the existing dataset, and added a new dataset, to support group and group member sorting parameterization, and then made modifications to the report layout to support the stated client reporting needs.

We next added report parameters to support group and group member sorting parameterization, and modified matrix settings to fully enable the newly supported parameterization. We then modified the face of the report to dynamically reflect group and group member sorting parameter selections made at run time. Finally, we discussed the results obtained with the development techniques that we exploited throughout our practice session.

» 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