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 Jul 29, 2008

Mastering OLAP Reports: Parameterizing Number of "Top" Items with the MDX TopCount() Function, Part I - Page 5

By William Pearson

We next need to change the column heading associated with the Group we modified earlier, so that it reflects Months, versus the previous grouping criteria of Sales Territory Group.

37.  Right-click the text box containing the column label (immediately above the two measure values’ column labels) in the Layout tab (the text box currently contains the expression =Fields!Sales_Territory_Group.Value).

38.  Select Expression... from the context menu that appears, as depicted in Illustration 17.


Illustration 17: Modifying the Primary Column Label

The Expression Editor opens.

39.  Replace the expression in the upper portion of the Editor with the following:

=Fields!Month.Value

Recall that the intent is to label the column to reflect the nature of the Group we have put in place: Months instead of Sales Territory Group.

40.  The Expression Editor appears, with our modification, as shown in Illustration 18.


Illustration 18: The Expression Editor with Our Substitution in Place

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

42.  Click the column heading for which we have just changed the expression, if necessary, simply to select the textbox.

43.  Change the Font Size, in the Format toolbar atop the design environment, from 12pt to 10pt, to make the presentation more compact, as depicted in Illustration 19.


Illustration 19: Change the Font to 10pt ...

All that remains to complete our preparatory steps is to remove the pre-existing Report Parameter. Recall that one of our earlier steps was to remove the Product entry from the Filter pane (the sample report from which our report was cloned came equipped with a parameterized Product filter). This entry had been established with the Parameter checkbox selected, a common way to create a parameterized filter, as we have seen in various other articles of the MSSQL Server Reporting Services series. Because parameterization was selected for the Product filter, it follows that a Report Parameter might well have been created at the time the entry was made. We will now remove the remaining Report Parameter.

44.  From the main menu, select Report -> Report Parameters..., as shown in Illustration 20.


Illustration 20: Select Report -> Report Parameters...

The Report Parameters dialog opens, and we see a single Report Parameter listed.

45.  Ensure that the ProductCategory Parameter is selected.

46.  Click the Remove button, as depicted in Illustration 21.


Illustration 21: Removing the Residual Report Parameter ...

47.  Click OK to accept our modifications, and to dismiss the (now empty) Report Parameters dialog.

We will execute the report to ascertain that our modifications are complete, and that we have a working report for the practice session that follows.

48.  Click the Preview tab, as shown in Illustration 22.


Illustration 22: Click the Preview Tab to Execute the Report

The Report is being generated message briefly appears, and then the report displays. The modified report appears as partially depicted in Illustration 23.


Illustration 23: The Modified Report (Partial View)

We note that the fiscal months July 2001 through July 2004 appear (representing a total of 37 months, the earliest of which are relatively sparse with regard to data).

Our report is now ready for the practice exercise, which we will begin in the next section.



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