prompt set manager – saving and re-using prompts in cognos bi crop production services loveland,...

28
Prompt Set Manager – Saving and Re-using Prompts in Cognos BI Crop Production Services Loveland, CO May 2011

Upload: reynold-simpson

Post on 27-Dec-2015

218 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Prompt Set Manager – Saving and Re-using Prompts in Cognos BI Crop Production Services Loveland, CO May 2011

Prompt Set Manager – Saving and Re-using Prompts in Cognos BI

Crop Production ServicesLoveland, CO

May 2011

Page 2: Prompt Set Manager – Saving and Re-using Prompts in Cognos BI Crop Production Services Loveland, CO May 2011

About Crop Production Services

• Retail distributor of agricultural inputs– Chemical– Seed– Fertilizer– Services (blending, application)

• Headquartered in Loveland, CO• Retail locations in USA, Canada, S. America, and Australia• Approximately $9 billion in annual revenue• Owned by Agrium, Calgary Canada (Symbol = AGU)• Cognos users since ReportNet 1.1 (2004)

Page 3: Prompt Set Manager – Saving and Re-using Prompts in Cognos BI Crop Production Services Loveland, CO May 2011

CPS North America

Page 4: Prompt Set Manager – Saving and Re-using Prompts in Cognos BI Crop Production Services Loveland, CO May 2011

CPS BI Design Principles

Develop reports that are: • Highly flexible

– Write 1, not 10

• Self-describing– Textual help on prompt page– Prompt values always output on report page

• Should require little or no training– Graduated user interface– Simple navigation

Page 5: Prompt Set Manager – Saving and Re-using Prompts in Cognos BI Crop Production Services Loveland, CO May 2011

Typical CPS Cognos Report

Page 6: Prompt Set Manager – Saving and Re-using Prompts in Cognos BI Crop Production Services Loveland, CO May 2011

Prompt Menu (shows current selections)

Page 7: Prompt Set Manager – Saving and Re-using Prompts in Cognos BI Crop Production Services Loveland, CO May 2011

Sample Prompts

Page 8: Prompt Set Manager – Saving and Re-using Prompts in Cognos BI Crop Production Services Loveland, CO May 2011

More Sample Prompts

Page 9: Prompt Set Manager – Saving and Re-using Prompts in Cognos BI Crop Production Services Loveland, CO May 2011

Column Projection Prompts

Page 10: Prompt Set Manager – Saving and Re-using Prompts in Cognos BI Crop Production Services Loveland, CO May 2011

CPS Item Sales Report

• Prompt Page contains 65 total prompts– 28 data filtering prompts– 37 data projection (column output) prompts

• Allows user to build a highly summary or highly detailed report based on their selections

• Leverages typical javascript techniques to hide and show prompts to reduce complexity for the user

• Most heavily used report at CPS– But had one significant shortcoming….

Page 11: Prompt Set Manager – Saving and Re-using Prompts in Cognos BI Crop Production Services Loveland, CO May 2011

Frustrated Users….

-----Original Message-----From: < A Typical User> Sent: 3/2/2009 10:21:32 AMTo: Wheat, David [mailto:[email protected]];

CC: <Pretty much everybody> Subject: Saved Parameters for Item Sales Reports

David,

Is there any way to save parameters on the Cognos Item Sales report accessible from the Decision Support Portal like we can in Segmentation?   Thanks, Dave

Page 12: Prompt Set Manager – Saving and Re-using Prompts in Cognos BI Crop Production Services Loveland, CO May 2011

The PromptSet Manager Toolbar

• Developed by BrightStar Partners for CPS in 2009• www.brightstarpartners.com• Services and utilities that enhance Cognos modeling, development, and

administration• Moderate COGNOise technical forum www.cognoise.com

• Available for purchase (we think) from BSP• Requires:

• A SQL Server DB to save prompt sets• Modifications to reports to include PromptSet Manager

Page 13: Prompt Set Manager – Saving and Re-using Prompts in Cognos BI Crop Production Services Loveland, CO May 2011

Saving current prompt values

Page 14: Prompt Set Manager – Saving and Re-using Prompts in Cognos BI Crop Production Services Loveland, CO May 2011

Reusing a saved prompt set

Page 15: Prompt Set Manager – Saving and Re-using Prompts in Cognos BI Crop Production Services Loveland, CO May 2011

Manage Prompt Sets

Page 16: Prompt Set Manager – Saving and Re-using Prompts in Cognos BI Crop Production Services Loveland, CO May 2011

Technical Requirements

Five Key Components: • Prompt Set Manager Website/Virtual Directory

– PSM must have its own Virtual Directory in a IIS website– CPS uses the same website as IBM Cognos

• MS SQL Database– Handles Stored Procedures, Prompt Sets, Parameters, Reports and Users

• Data Access layer– .aspx pages access and update the database

• User Interface– What you have seen from previous slides

• Client Scripts– JavaScript ‘method calls’ that access PSM scripts

Page 17: Prompt Set Manager – Saving and Re-using Prompts in Cognos BI Crop Production Services Loveland, CO May 2011

Prompt Set Manager Website/Virtual Directory

• Traditional IBM Cognos url– http://dcpcognos2:80/ibmcognos/cgi-bin/cognosisapi.dll?b_action=cognosViewer&ui.action=run&ui.object=%2fcontent%2fpackage%5b%40name%3d

%27UAP%20DW%27%5d%2ffolder%5b%40name%3d%27Sales%20and%20Margin%27%5d%2ffolder%5b%40name%3d%27Pre%20Production%20Testing%27%5d%2freport%5b%40name%3d%27PSM%20Example%27%5d&ui.name=PSM%20Example&run.outputFormat=&run.prompt=true

• PSM url with IBM Cognos search path– http://dcpcognos2/promptsetmanager/Default.aspx?username=gcadamc&format=PDF&formats=PDF&title=PSM

Example&searchpath=/content/package[@name='UAP DW']/folder[@name='Sales and Margin']/folder[@name='Pre Production Testing']/report[@name='PSM Example']

• The IBM Cognos report Search Path is appended to the Prompt Set Manager Website URL

Page 18: Prompt Set Manager – Saving and Re-using Prompts in Cognos BI Crop Production Services Loveland, CO May 2011

Database

• MS SQL Server tables and Store Procedures• Dynamic table creation and minimal maintenance

Page 19: Prompt Set Manager – Saving and Re-using Prompts in Cognos BI Crop Production Services Loveland, CO May 2011

Data Access Layer

• Flow

IBM Cognos report with a Set of Selected Prompts

.aspx calls and POST MS SQL

PSM DB

Page 20: Prompt Set Manager – Saving and Re-using Prompts in Cognos BI Crop Production Services Loveland, CO May 2011

User Interface

• Components– HTML file containing a toolbar and Iframe

– The Iframe houses the actual report prompt page and strips the prompt values and display values from the page.

– But how is this done?

Page 21: Prompt Set Manager – Saving and Re-using Prompts in Cognos BI Crop Production Services Loveland, CO May 2011

Client Scripts

• JavaScript Components in PSM– General Layout Requirements– Finish button– HTML Items

• JAVASCRIPT• Surrounding ParameterDisplayValue DIV tags

Page 22: Prompt Set Manager – Saving and Re-using Prompts in Cognos BI Crop Production Services Loveland, CO May 2011

General Layout Requirements

• At CPS we have a lot going on with our prompt pages

• However PSM only requires a few of the HTML Items seen above

Page 23: Prompt Set Manager – Saving and Re-using Prompts in Cognos BI Crop Production Services Loveland, CO May 2011

General Layout Components

Page 24: Prompt Set Manager – Saving and Re-using Prompts in Cognos BI Crop Production Services Loveland, CO May 2011

Finish Button

• The Finish Button is actually an HTML item with a button tag.

• onclick this button calls a function.

Page 25: Prompt Set Manager – Saving and Re-using Prompts in Cognos BI Crop Production Services Loveland, CO May 2011

Finish Button Function

• Onclick runReport() function

– Parent.Runreport();» This method activates PSM, saves the prompts and runs

the report.– promptButtonFinish();

» This method is an embedded IBM Cognos function that is the standard function that cognos uses when a regular button is clicked. It runs the report if PSM is not found.

Page 26: Prompt Set Manager – Saving and Re-using Prompts in Cognos BI Crop Production Services Loveland, CO May 2011

Other Functions

• runPageFunctions()

– If PSM and a previously saved prompt set is found outside the Iframe, this function updates the parameters on the prompt page on page load

Page 27: Prompt Set Manager – Saving and Re-using Prompts in Cognos BI Crop Production Services Loveland, CO May 2011

Surrounding ParameterDisplayValue DIV tags

• To have the previously selected Prompt Set’s values appear, surround paramdisplayvalues in div tags with a distinct ID.

– PSM recognizes the ID and displays the Prompt Sets on Saved Prompt Set load.

Page 28: Prompt Set Manager – Saving and Re-using Prompts in Cognos BI Crop Production Services Loveland, CO May 2011

Questions?