MSSQL Server Reporting Services: Mastering OLAP Reporting: Relationally-Based Picklists for OLAP Reporting - Page 4

September 19, 2005

Create a Report Parameter and Populate It with the Picklist Dataset

Having created our Product Family picklist Dataset (I named mine pX_ProdFamily, with the prefix "pX_" serving as an easy "reminder" that the Dataset exists to support a picklist), we are now ready to "connect" the Dataset with a new Report Parameter. We would go to the Layout tab of the Report Designer, and then select Report -à Report Parameters from the main menu atop the Designer, to start.

We would obviously either delete or modify the original ProductFamily report parameter, next creating a new parameter (I left mine with the same name in the samples I worked up for illustrations). We would then take the following actions within the Report Parameters dialog:

1.  Ensure that ProductFamily appears in the Name box.

2.  Ensure that Product Family: appears in the Prompt box.

3.  Leave Data type at its default of "String."

4.  Clear the checkboxes to the immediate left of the captions Allow null value and Allow blank value (appearing beneath the Prompt box).

5.  Select the From query radio button underneath Available values.

6.  Underneath the Dataset caption, select pX_ProdFamily, the Dataset we created earlier.

7.  Underneath Value field, select UniqName.

8.  Underneath Label field, select DispName.

9.  Select the From query radio button underneath Default values.

10.  Underneath the Dataset caption, select pX_ProdFamily, once again.

11.  Underneath Value field, select UniqName.

We have now "connected" our relational picklist table with our report, via the Report Parameters dialog. Further, we have ensured the satisfaction of another consumer request, for the "All Products" picklist item to fall into place as the default at runtime. We have facilitated this by our placement of the Unique Name as the Value field from which the default value is selected. Placing UniqName in the Value selector will ensure that the available UniqName fields are retrieved, with the value from the first row in the dataset – forced "to the top" by our sort key even if another, later addition alphabetically precedes naturally – used as the default value.

The Report Parameters dialog for the new ProductFamily parameter appears as shown in Illustration 5.


Illustration 5: Report Parameters Dialog for ProductFamily

12.  Click OK to save the new Report Parameters settings and to dismiss the Report Parameters dialog.

The dialog closes, leaving us with a new parameter in place. Our next step would be to add the parameter into the axis specification (or into the WHERE statement, possibly) of the MDX query that underlies the primary Dataset. Once the query was entered correctly, and the report's data fields were updated, we would string the query appropriately with the "=" sign preceding it, as well as enclosing it in quotation marks, as I show in many, many instances within my MSSQL Server Reporting Services series, most specifically within the Mastering OLAP Reporting subset of the series.

We would then proceed to preview the report, where we would see a picklist appear within the Product Family selection box that resembles that depicted in Illustration 6.


Illustration 6: The Product Family Picklist, with New Display Names in Place

As we have stated earlier, numerous changes would have to be made to the FoodMart Sales report to make it functional with the alterations we have examined. We would have to alter the primary Dataset to reference the parameter correctly, as well as to either supply Datasets to support parameters for lower levels of the Product dimension, to alter the query to populate the presented levels by taking the necessary record sets into consideration in the query, to eliminate the levels from the report, or otherwise reconcile the primary Dataset with the original report layout. My intent here was to discuss concepts more than to provide a hands-on recreation of the sample report.

Conclusion ...

In this article, we extended our exploration of parameter picklist support for our Reporting Services OLAP reports to examine a simply constructed, relationally based solution. In a departure from our typical, detailed "step by step" approach, we discussed a general procedure that allows for a great deal of flexibility in customization and extension for varying business environments. We began with a description of several expressed business needs within the OLAP reporting environment of a hypothetical client, and then discussed the use of a relational table to house the names desired for runtime display in report picklists, together with the associated "qualified" MDX names required to generate the primary OLAP Dataset. (The ultimate purpose of the primary Dataset, of course, is to provide the information presented in the report).

Next, we explored a simple layout for a table to support parameter picklists in our OLAP reports, providing examples of the data with which we would populate the table to support a given picklist level within the sample FoodMart Sales report. We then examined the settings required for referencing the picklist support table within the report via the Report Parameters dialog. Throughout our discussion, we highlighted strengths of using a relational table for picklist support, focusing upon ways that it could be used to meet business requirements in a flexible way that might be useful in many operating scenarios.

» See All Articles by Columnist William E. Pearson, III

Discuss this article in the MSSQL Server 2000 Reporting Services Forum.

MSSQL Server Reporting Services
Introducing the Tablix Data Region: Basic Grouping Concepts
Introducing the Tablix Data Region in Reporting Services 2008
100% Stacked Column Chart for Analysis Services Data
XY (Scatter) Chart for Analysis Services Data
Simple Doughnut Chart for Analysis Services Data
Exploded Pie Chart for Analysis Services Data
Stacked Bar Chart for Analysis Services Data
Line Chart for Analysis Services Data
Stacked Column Chart for Analysis Services Data
A More Advanced Pie Chart for Analysis Services Data
Simple Pie Chart for Analysis Services Data
Simple Bar Chart for Analysis Services Data
Simple Column Chart for Analysis Services Data
Introducing Reporting Services Charts for Analysis Services
Mastering OLAP Reports: Parameterized Grouping
Mastering OLAP Reports: Parameterizing Number of "Top" Items with the MDX TopCount() Function, Part II
Mastering OLAP Reports: Parameterizing Number of "Top" Items with the MDX TopCount() Function, Part I
Mastering OLAP Reports: Parameterizing Number of "Look Back" Periods with the MDX LastPeriods() Function, Part II
Mastering OLAP Reports: Parameterizing Number of "Look Back" Periods with the MDX LastPeriods() Function, Part I
Support Parameterization from Analysis Services - Parameter Defaults
Parameterization from Analysis Services - Cascading Picklists
Support Parameterization from Analysis Services
Parameter Support Objects, Pt II: Support OLAP Parameter Defaults with Datasets
Reporting Services: Customize Automatically Created Parameter Support Objects
Snapshot Reports II: SQL Server Management Studio Perspective
Snapshot Reports I: Report Manager Perspective
Report Execution Caching II: Report Manager Perspective
Report Execution Caching I: SQL Server Management Studio Perspective
Report Session Caching in Reporting Services 2005
Black Belt Administration: Reporting Services Configuration Manager
Intelligent Layering: Leverage Conditional Formatting Logic from Analysis Services
Black Belt Administration: Performance Dashboard for Microsoft SQL Server, Part II
Black Belt Administration: Performance Dashboard for Microsoft SQL Server, Part I
Mastering OLAP Reports: Extend Reporting Services with Custom Code
Mastering OLAP Reports: Parameters for Analysis Services Reporting, Pt. II
Black Belt Components: Support Simple Navigation with a Document Map
Mastering OLAP Reports: Parameters for Analysis Services Reporting, Pt. I
Black Belt Components: Interactive Sorts within a Matrix Data Region
BlackBelt Authoring: Conditional Drillthrough to Multiple Reports
Mastering OLAP Reporting: Prototype KPIs in Reporting Services
BlackBelt Administration: Linked Reports in SQL Server Management Studio
BlackBelt Administration: Linked Reports in Report Manager
Mastering OLAP Reporting: Reporting with Analysis Services KPIs
Report Builder: Creating a Report Model
Mastering OLAP Reporting: Meet Business Needs with Matrix Dynamics, Part II
Mastering OLAP Reporting: Meet Business Needs with Matrix Dynamics, Part 1
Mastering OLAP Reporting: Display a Dataset Field in a Report Page Header
Interactive Sorting Within Reporting Services
MSSQL Server Reporting Services: Mastering OLAP Reporting: Multiple Value Selection in a Parameter Picklist
MSSQL Server Reporting Services : Mastering OLAP Reporting: Drilling Through Using MDX
MSSQL Server Reporting Services: Mastering OLAP Reporting: Relationally-Based Picklists for OLAP Reporting
MSSQL Server Reporting Services: Mastering OLAP Reporting: Extending Conditional Formatting: SWITCH and Drilldown Defaults
MSSQL Server Reporting Services: Mastering OLAP Reporting: Percent of Total - Chart Presentation Nuances
MSSQL Server Reporting Services: Mastering OLAP Reporting: Percent of Total - Two Perspectives
MSSQL Server Reporting Services : Mastering OLAP Reporting: Ad Hoc TopCount and BottomCount Parameters
MSSQL Server Reporting Services: Black Belt Components: Ad Hoc Sorting with Parameters
MSSQL Server Reporting Services: Black Belt Administration: "Governor" Capabilities: Report Execution Timeout
MSSQL Server Reporting Services : Black Belt Administration: Execution Log Performance and Audit Reports
MSSQL Server Reporting Services: Black Belt Administration: Prepare the Execution Log for Reporting
MSSQL Server Reporting Services: Black Belt Components: Ad Hoc Conditional Formatting for OLAP Reports
MSSQL Server Reporting Services : Black Belt Components: Manage Nulls in OLAP Reports
MSSQL Server Reporting Services: Reporting Services Basics: Create a Reusable Template Report
MSSQL Server Reporting Services: Master Chart Reports: Track Exchange Rates in a Line Chart
MSSQL Server Reporting Services: Master Chart Reports: Pie Charts in Reporting Services
MSSQL Server Reporting Services: Mastering OLAP Reporting: Cascading Prompts
MSSQL Server Reporting Services: Managing Reporting Services: Data-driven Subscriptions, and External Data Sources for Subscriber Data
MSSQL Server Reporting Services: Managing Reporting Services: Report Execution and Standard Subscriptions
MSSQL Server Reporting Services: Managing Reporting Services: Data Connections and Uploads
MSSQL Server Reporting Services: The Authoring Phase: Overview Part II
MSSQL Server Reporting Services: The Authoring Phase: Overview Part I
MSSQL Server Reporting Services: A New Paradigm for Enterprise Reporting








The Network for Technology Professionals

Search:

About Internet.com

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers