Northwestern University Business Intelligence Solutions Cognos 8 Best Practices Volume 3 Advanced Developer Techniques.

Slides:



Advertisements
Similar presentations
A Managerial Approach to a Decentralized Report Writing Environment Agenda Historical Perspective and the Need for Change Policies & Procedures Group Training.
Advertisements

Performance Tuning Compiled from: Oracle Database Administration, Session 13, Performance, Harvard U Oracle Server Tuning Accelerator, David Scott, Intec.
WEB DESIGN TABLES, PAGE LAYOUT AND FORMS. Page Layout Page Layout is an important part of web design Why do you think your page layout is important?
UNIT –UIS Villanova Business Intelligence Cognos Training Level 1 Cletus Rickert Director -UIS.
DATA WAREHOUSE QueryLink TUTORIAL QueryLink is used to retrieve Campus data for Departmental use. This tutorial presents an overview of the point and click.
Copyright  Oracle Corporation, All rights reserved. 1 Creating an Application: The AppBuilder for Java IDE.
1099 Pro, Inc. – Software for Pro Enterprise Edition Features.
Technical BI Project Lifecycle
Cognos Dashboard Creation Business Intelligence. What is a Dashboard? A dashboard is a collection of information in one place. An effective dashboard.
Lesson 4 Advanced Forms Handling. Aggravations Long forms that make you scroll out of the normal viewing area Lets create a scrollable form that is a.
Northwestern University Business Intelligence Solutions Build Cubes in Cognos 8.4.
Northwestern University Business Intelligence Solutions Cognos 8 Best Practices Volume 1 Report Properties and Default Filters.
Chapter 16 Dynamic HTML and Animation The Web Warrior Guide to Web Design Technologies.
Cognos 8.4 Upgrade Business Intelligence. Why Cognos 8.4 Increased Performance on Database due to optimized SQL and more filters passed in native SQL.
Multiple Tiers in Action
Stanford University EH&S A Service Oriented Architecture For Rich Internet Applications Sheldon M. Heitz.
Computer Science 101 Web Access to Databases Overview of Web Access to Databases.
Unit 10 – Logic and Venn Diagrams
Prompt Set Manager – Saving and Re-using Prompts in Cognos BI Crop Production Services Loveland, CO May 2011.
You can use a query to view a subset of your data or to answer questions about your data. For example, if you want to view a list of student names and.
SERVER web page repository WEB PAGE instructions stores information and instructions BROWSER retrieves web page and follows instructions Server Web Server.
Project Implementation for COSC 5050 Distributed Database Applications Lab3.
TATA CONSULTANCY SERVICES
Client Scripting1 Internet Systems Design. Client Scripting2 n “A scripting language is a programming language that is used to manipulate, customize,
Javascript. Outline Introduction Fundamental of JavaScript Javascript events management DOM and Dynamic HTML (DHTML)
Agency (BU) Query Manager Training State of Indiana Instructor: Lori Shapiro, ENTAP.
Caching Chapter 12. Caching For high-performance apps Caching: storing frequently-used items in memory –Accessed more quickly Cached Web Form bypasses:
Database Systems Microsoft Access Practical #3 Queries Nos 215.
Advanced Ad Hoc Reporting Workshop Randy Wadle, CEO.
Office 2003 Post-Advanced Concepts and Techniques M i c r o s o f t Access Project 7 Advanced Report and Form Techniques.
audio video object Options: controls autoplay Need to define height and width Options: controls autoplay.
Databases with LINQ. LINQ to SQL LINQ to SQL uses LINQ syntax to query databases. LINQ to SQL classes are automatically generated by the IDE’s LINQ to.
1 Chapter 6: Using Prompts in Tasks and Queries 6.1 Prompting in Projects 6.2 Creating and Using Prompts in Tasks 6.3 Creating and Using Prompts in Queries.
Introduction to Views Stanford Drupal Camp April 6, 2013.
CSCI 6962: Server-side Design and Programming Master Pages.
1 Chapter 4: Creating Simple Queries 4.1 Introduction to the Query Task 4.2 Selecting Columns and Filtering Rows 4.3 Creating New Columns with an Expression.
Advanced Adhoc Reporting 2010 Visions Conference July 28, 2010.
ASP.NET User Controls. User Controls In addition to using Web server controls in your ASP.NET Web pages, you can create your own custom, reusable controls.
Gourav Atalkar Software Engineer bispsolutions.wordpress.com.
Visual Basic for Application - Microsoft Access 2003 Finishing the application.
1 SQL – IV Grouping data from tables in SQL –The concept of grouping –GROUP BY clause –HAVING Clause –Determining whether values are unique –Group by using.
23 Copyright © 2009, Oracle. All rights reserved. Oracle Business Intelligence Answers: Advanced Features.
Session id: Darrell Hilliard Senior Delivery Manager Oracle University Oracle Corporation.
Drill-Through Features Cognos 8 BI. Objectives  In this module we will examine:  Cognos 8 Drill Through Overview  Model / Package Drill Through  Cross.
® IBM Software Group © 2006 IBM Corporation Dependent Combo-Box U.I. Development This Learning Module walks you through the options and development techniques.
Cognos Report Studio Prompts and Subqueries. Creating a Prompt In the Query Explorer, drag the field that will require a criteria prompt into the filter.
21 Copyright © 2009, Oracle. All rights reserved. Working with Oracle Business Intelligence Answers.
Spring 2008The Greedy Method1. Spring 2008The Greedy Method2 Outline and Reading The Greedy Method Technique (§5.1) Fractional Knapsack Problem (§5.1.1)
Oracle Business Intelligence Foundation – Testing and Deploying OBI Repository.
22 Copyright © 2009, Oracle. All rights reserved. Filtering Requests in Oracle Business Intelligence Answers.
CHAPTER 7 LESSON C Creating Database Reports. Lesson C Objectives  Display image data in a report  Manually create queries and data links  Create summary.
24 Copyright © 2009, Oracle. All rights reserved. Building Views and Charts in Requests.
HTML LAYOUTS. CONTENTS Layouts Example Layout Using Element Example Using Table Example Output Summary Exercise.
A Presentation Presentation On JSP On JSP & Online Shopping Cart Online Shopping Cart.
INTRODUCTION ABOUT DIV Most websites have put their content in multiple columns. Multiple columns are created by using or elements. The div element is.
CHAPTER 7 LESSON B Creating Database Reports. Lesson B Objectives  Describe the components of a report  Modify report components  Modify the format.
IFS180 Intro. to Data Management Chapter 10 - Unions.
Creating Oracle Business Intelligence Interactive Dashboards
Information Manager Reports
Objectives Create an action query to create a table
SAP BUSINESS OBJECTS WEB INTELLIGENCE RICH CLIENT
Chapter 4 Summary Query.
Introducing the New Directory Search
Access: Queries IV Participation Project
Query Processing CSD305 Advanced Databases.
Servers Options Put all services on one server, or
Tutorial 9 Using Action Queries and Advanced Table Relationships
Presentation transcript:

Northwestern University Business Intelligence Solutions Cognos 8 Best Practices Volume 3 Advanced Developer Techniques

Agenda JavaScript Prompt Limiter –How to use JavaScript to limit the number of elements a user can select in a multi-select prompt. Report Cache –Used to cache prompts for a report to optimize the prompt page response. Burst Reports –Use distribution lists to distribute reports. Join/Union/Intersect/Except/Master-Detail –How to join data from multiple queries.

JAVASCRIPT PROMPT LIMITER Section 1

Report Prompt Behavior Users can overload the selection easily by using the Select all button.

Multi-Select Prompt Properties In the properties pane for a multi-select prompt, you can set the number of rows to be displayed per page in the list, but there is no option to limit how many selections a user can make.

Why Limit User Selection Oracle only allows 1,000 items to be used in the IN statement of a SQL query. Large amount of values in a prompt can cause the report performance issues. Large values in a prompt can return a report too large to supply good Business Intelligence. Allow the users access to choose from all the possible dimensional members, even if they cant choose all of them at one time.

Add JavaScript to Prompt Page In Cognos 8.4, IBM Cognos changed the names of items making older JavaScript not run correctly. The new way to call items now should be future proof since the prompt is defined in a DIV tag and identified with the getElementByID function. JavaScript should be used minimally in reports as a best practice, but sometimes the only way to force client behavior. The cost/benefit balance in this case lies distinctly in the use of JavaScript.

How to Build Prompt Page Put three HTML items on the page, one before the prompt, one right after the prompt, and one to replace the Finish button. <script … <script … <div class="clsPromptComponent …

HTML Items 1 The first HTML item starts the div tag for this prompt object. This item should be the object just before the prompt object. If the prompt object is in a table, this item should be in the same cell. This will allow the JavaScript function to find the prompt object

HTML Item 2 This item starts with the ending Div tag to close the prompt object. This item then starts the JavaScript and defines the function used to count the items in the prompt and either move forward or show an alert. This function needs to be different depending on the type of prompt used. It must be placed right after the prompt object to correctly wrap the prompt in the DIV tag. …

HTML Item 3 This object replaces the Finish button. It must create the Finish button. On click, instead of running the PromptAction(finish) it will call the Function we created in HTML Item 2 Finish …

Search and Select Prompt

Script for Search & Select function CountSelected() {var eleSearch1 = document.getElementById("selectValues"); var selectObject = eleSearch1.getElementsByTagName("SELECT"); var eleSearch1Details = null; var Search1Len = 0; var foundSelections = false; if (selectObject[1] && selectObject[1] != undefined) {eleSearch1Details = selectObject[1].getElementsByTagName('OPTION'); Search1Len = eleSearch1Details.length; if (Search1Len < 11) {foundSelections = true;}} if (foundSelections == true) {promptAction('finish'); } else {alert('The number of selected items is too high, it should be 10 or less, you currently have ' + Search1Len + ' items selected. Please remove some items then click on Finish again.');}}

Picklist Prompt

Script for Picklist Prompt function CountSelected() {var Counter = 0; var i; var eleTg1 = document.getElementById("selectPicklist"); var SelectObject = eleTg1.getElementsByTagName("select"); if (SelectObject[0] && SelectObject[0] != undefined) {for ( i = 0; i < SelectObject[0].options.length; i++) {if (SelectObject[0].options[i].selected == true) {Counter++;}} if (Counter < 11) {promptAction('finish'); } else {alert('The number of selected items is too high, it should be 10 or less, you currently have ' + Counter + ' items selected. Please remove some items then click on Finish again.');}}}

Checkbox Prompt

Script for Checkbox Prompt function CountSelected() {var Counter = 0; var i; var eleTg1 = document.getElementById("selectPicklist"); var SelectObject = eleTg1.getElementsByTagName("input"); for ( i = 0; i < SelectObject.length; i++) {var node = SelectObject[i]; if (node.checked) {Counter++;}} if (Counter < 11) {promptAction('finish'); } else {alert('The number of selected items is too high, it should be 10 or less, you currently have ' + Counter + ' items selected. Please remove some items then click on Finish again.');}}

Multiple Prompts Here is a case where you might have two different multiple selection prompts and you want each one limited, possibly even with a different limit value.

Scripts for Multiple Prompts function CountCheckbox() {var Counter = 0; var i; var eleTg1 = document.getElementById("selectPicklist"); var SelectObject = eleTg1.getElementsByTagName("input"); for ( i = 0; i < SelectObject.length; i++) { var node = SelectObject[i]; if (node.checked) {Counter++;} } return Counter;} function CountCheckbox() {var Counter = 0; var i; var eleTg1 = document.getElementById("selectPicklist"); var SelectObject = eleTg1.getElementsByTagName("input"); for ( i = 0; i < SelectObject.length; i++) { var node = SelectObject[i]; if (node.checked) {Counter++;} } return Counter;} function CountPicklist() {var Counter2 = 0; var i2; var eleTg2 = document.getElementById("selectPicklist2"); var SelectObject2 = eleTg2.getElementsByTagName("select"); if (SelectObject2[0] && SelectObject2[0] != undefined) {for ( i2 = 0; i2 < SelectObject2[0].options.length; i2++) {if (SelectObject2[0].options[i2].selected == true) {Counter2++;} } } return Counter2;} function CountPicklist() {var Counter2 = 0; var i2; var eleTg2 = document.getElementById("selectPicklist2"); var SelectObject2 = eleTg2.getElementsByTagName("select"); if (SelectObject2[0] && SelectObject2[0] != undefined) {for ( i2 = 0; i2 < SelectObject2[0].options.length; i2++) {if (SelectObject2[0].options[i2].selected == true) {Counter2++;} } } return Counter2;} function CountSelected() {var numOfPrompts = 2; var limitForPrompt1 = 10; var limitForPrompt2 = 10; var isPromptsGood = 0; var counterCheckbox = CountCheckbox(); var counterPicklist = CountPicklist(); if (counterCheckbox <= limitForPrompt1) //Check first prompt {isPromptsGood += 1;} else {alert('The number of selected items is too high in the checkbox, it should be ' + limitForPrompt1 + ' or less, you currently have ' + counterCheckbox + ' items selected. Please remove ' + (counterCheckbox - limitForPrompt1) + ' items then click on Finish again.');} if (counterPicklist <= limitForPrompt2) //Check second prompt {isPromptsGood += 1;} Else {alert('The number of selected items is too high in the picklist, it should be ' + limitForPrompt2 + ' or less, you currently have ' + counterPicklist + ' items selected. Please remove ' + (counterPicklist - limitForPrompt2) + ' items then click on Finish again.');} if (isPromptsGood == 2) //Check if all prompts are good {promptAction('finish');} Else {alert('Fix the prompts then click on Finish again.');} } function CountSelected() {var numOfPrompts = 2; var limitForPrompt1 = 10; var limitForPrompt2 = 10; var isPromptsGood = 0; var counterCheckbox = CountCheckbox(); var counterPicklist = CountPicklist(); if (counterCheckbox <= limitForPrompt1) //Check first prompt {isPromptsGood += 1;} else {alert('The number of selected items is too high in the checkbox, it should be ' + limitForPrompt1 + ' or less, you currently have ' + counterCheckbox + ' items selected. Please remove ' + (counterCheckbox - limitForPrompt1) + ' items then click on Finish again.');} if (counterPicklist <= limitForPrompt2) //Check second prompt {isPromptsGood += 1;} Else {alert('The number of selected items is too high in the picklist, it should be ' + limitForPrompt2 + ' or less, you currently have ' + counterPicklist + ' items selected. Please remove ' + (counterPicklist - limitForPrompt2) + ' items then click on Finish again.');} if (isPromptsGood == 2) //Check if all prompts are good {promptAction('finish');} Else {alert('Fix the prompts then click on Finish again.');} } Finish var promptButtonFinish = new CPromptButton (document.getElementById("finishButton"), PROMPTBUTTON_FINISH, true, "NS"); oCV_NS_.pageNavigationObserverArray = oCV_NS_.pageNavigationObserverArray.concat("promptButtonFinish"); oCV_NS_.notify(); Finish var promptButtonFinish = new CPromptButton (document.getElementById("finishButton"), PROMPTBUTTON_FINISH, true, "NS"); oCV_NS_.pageNavigationObserverArray = oCV_NS_.pageNavigationObserverArray.concat("promptButtonFinish"); oCV_NS_.notify();

Multiple Prompts This process can also be used to check multiple prompts. Create the DIV tags and functions around each prompt item as before, however dont use the PromptAction(finish) inside the individual functions, instead return a result of True/False. Create another HTML Item with a function that calls the individual functions and determines if their results are all True, if so, it runs the PromptAction(finish). Have the Finish button call this function.

Code Examples Folder A new folder has been created on Dev to house Code Examples created by the BI team. These objects can be opened in Report Studio to see and copy/paste the javascript to reuse in other prompt reports.

REPORT CACHE Section 2

Report Prompt Performance A user clicks on run and gets the hourglass waiting for the prompt page to retrieve its data and render.

Set the Report Cache Click on the Set Properties for the report.

Set the Report Cache cont. On the Report tab, click on the Advanced options to expose the Report Cache properties. Click on the Refresh the Report Cache property. Then set the time to hold the cache before it is refreshed. We recommend it should be refreshed at least as often as the dimensional data the prompt uses.

BURST REPORTS Section 3

Why Burst Reports Burst Reports Run Once Distribute Many Burst Reports are subset of data in the report based on grouping Each grouping can go to a unique recipient Recipients can be addresses, Cognos Contacts, Cognos Groups, or Cognos Distribution Lists Recipient/Grouping relationship can be defined in a table stored with the data and used for all burst reports

Examples of Report This report is grouped by the Sales Rep and then sent out to each sales rep with only their data. This grouping report ed to This grouping report ed to

Create Grouping and Burst Data Items This report has two important columns to allow bursting, the Staff name data item is the grouping column, and the UserID column actually defines the recipients for the grouping.

Set Burst Options Go to File/Burst Options to define how to burst the report.

Set Burst Options Cont. Define the grouping data item to use for the burst separation, in this case the Staff name of the sales rep is used to create our report example. Set the data item to define the recipient of the burst group, again, there must be a relationship in the report, or framework package, between the recipient and the grouped data item. Set the type of bursting, in this case all of our recipients are addresses so that is what we set.

Burst Recipients Mixed Type case lower(substring([gosales_goretailers].[Sales reps].[First name],1,1)+[gosales_goretailers].[Sales reps].[Last name]) when 'atorta' then when 'awilcox' then 'CAMID(":Burst Test Group 1")' else END case lower(substring([gosales_goretailers].[Sales reps].[First name],1,1)+[gosales_goretailers].[Sales reps].[Last name]) when 'atorta' then when 'awilcox' then 'CAMID(":Burst Test Group 1")' else END

Run a Burst Report In the run options screen, click on the advanced options link.

Run a Burst Report Cont. Set the report to run in the background. Set the Bursting option on for the report run. If the burst report is to be ed to its recipients, make sure to click on the Send the report by .

Schedule the Burst Report The schedule options screen is basically the same, just make sure you click on the Override the default values to get to this screen to set the options.

Burst Output in Archive

Burst Table Example BurstKeySales RepRecipient 1Alessandra 2Allisia WilcoxCAMID(":Burst Test Group 1") 3Ana OrozcoCAMID("CognosLDAP:u:authid= ") Add a table to your data source, it should include a Recipient value like what is listed below. Add the table to your Framework Package and create a join, in this case on the Sales Rep to the Staff Name table in the GO Sales package.

JOINS UNIONS INTERSECTS EXCEPTS MASTER-DETAIL Section 4

Q1Q2 Multiple Queries Reports often require multiple queries Queries can be related through different types of operations It is important to use the correct relationship to get the results required

Joins Joins are the most basic type of relationship, they function the same as they would in a SQL query. There are two basic types of joins that are defined by the cardinality –Inner joins –Outer joins EmpIDName 1John Smith 2Ann Wilcox EmpIDPosition 1Manager 3Technician NamePosition John SmithManager EmpIDName 1John Smith 2Ann Wilcox EmpIDPosition 1Manager 3Technician NamePosition John SmithManager Ann Wilcox Technician

Unions Unions are used to combine multiple queries into a single result-set. There must be the same number of data items. The data items must be compatible types. EmpIDName 1John Smith 2Ann Wilcox EmpIDName 5Anna Ortiz 6Tom Wilbur EmpIDName 1John Smith 2Ann Wilcox 5Anna Ortiz 6Tom Wilbur Q1Q2R

Intersects Intersects are used to combine multiple queries and return the matching set. Same criteria as Unions. EmpIDName 1John Smith 2Ann Wilcox EmpIDName 1John Smith 6Tom Wilbur EmpIDName 1John Smith Q1Q2 R

Excepts Excepts are used to return Q1 minus the matching records from Q2. Same criteria as Unions. EmpIDName 1John Smith 2Ann Wilcox EmpIDName 1John Smith 6Tom Wilbur EmpIDName 2Ann Wilcox Q1Q2 R

Master Detail Relationships A report that delivers information that would usually require two or more reports. Often used to combine lists and charts. Requires a parent container with a nested detail container –Parent frame for master query and nested frame for the detail –Associate Report page with master query and data container for detail query

Page Set Example In this example, a page set is created using Query 1 and paged by the Product name data item.

Page Layout A Chart object is added to the page, this is Query 2, after the data items are added to the query, the Master Detail relationship is defined so this chart only shows the Product name being displayed on the current page. This line holds the Query 1 elements of the Product image and Product name.

Report Output Example Product Image Product Name Sales by Staff for Product Sales by Retailer for Product