Sei sulla pagina 1di 147

Business Intelligence Specialist

Ahmed Abdel-Baky
Software Engineer
Arabic Competency & Globalization Center
IBM Egypt
abaky@eg.ibm.com
Skype: ahmed.mostafa2007
Phone: +27 (0) 766234973
Agenda
 Introduction
 Africa Skills Initiative Program
 Business Analytics & Business Intelligence
 B5A58
IBM Cognos Report Studio Author Professional Reports
Fundamentals (V10.2.2)
 B5A59
IBM Cognos Report Studio Author Professional Reports Advanced
(V10.2.2)
 Cognos Active Reports

2
The IBM Point of View:
Africa
MEA University www.ibm.biz/meauniversity

Program Benefits Academic Roadmaps

Students

Teachers

Universities
MEA University
www.ibm.biz/meauniversity
BI Specialist Academic Exam – Course B5A58
1. The Reporting Application 3. Focusing Reports (10%)
(7 questions, 12 %) – Filtering Data (unit 3)
– IBM Cognos BI Architecture and Tools – Using Prompts (unit 6)
(Volume 2, Appendix A) 4. Adding Value to Reports (10%)
– Report Studio Basics (unit 1) – Using Calculations (unit 7)
– Different Report Types – Using Additional Report Building
(list, crosstab, chart, map) Techniques (unit 8)
(units 1, 2, 4, and 5) 5. Enhancing Reports (7%)
2. Creating and Formatting Reports – Using Conditional Formatting (unit 9)
(5%) – Using Enhanced Report Layout
– Grouping (unit 2) (unit 12)
– Headers and Footers (unit 2) 6. Drill-Through Reports (7%)
– Other Formatting Options – Set up (units 10 and 11)
(units 4 and 5) – Definitions (units 10 and 11)

60 questions - 90 minutes - passing score: 60%


BI Specialist Academic Exam – Course B5A59
7. Creating Relationships between 10.Interaction with HTML (5%)
Queries (15%) – Interactive Reports (unit 8)
– Set Operations (unit 2) – Sending Emails (unit 8)
– Joins (unit 2) 11.Report Specification (5%)
– Query References (unit 1) – Structure (unit 6)
8. Designing Effective Prompts (12%) – Modification (unit 6)
– Criteria Specification (unit 4) – Customization (unit 6)
– Filtering and Sorting Data (unit 4) 12.Report Distribution (5%)
– Formatting (unit 4) – Burst Reports (unit 7)
9. Navigating Reports (7%) – Email Bursts (unit 7)
– Using Bookmarks (unit 3) – IBM Cognos Connection (unit 7)
– Using Table of Contents (unit 3)
– Using Drill-Through Definitions (unit 3)

60 questions - 90 minutes - passing score: 60%


Professional Exam Objectives in B5A58
 Create Reports (7 questions, 14 %)
– 2: Create List Reports
– 4: Create Crosstab Reports
– 5: Present Data Graphically
Test C2090-620
 Focus reports (6 questions, 12%) IBM Cognos 10 BI Author
– 3: Focus Reports Using Filters
– 6: Focus Reports Using Prompts 50 questions
 Enhance reports (22 questions, 44%) 60 minutes
– 7: Enhance Reports Using Calculations passing score: 74%
– 8: Using Additional Report Building Techniques
– 9: Customize Reports with Conditional Formatting
– 10: Drill-Through From One Report to Another
– 11: Drill-Through Definition
– 12: Enhance Report Layout
Professional Exam Objectives in B5A59
 Create reports using the query model
(9 questions, 18%)
–1: Create Query Models
Test C2090-620
–2: Create Reports Based on Query IBM Cognos 10 BI Author
Relationships
50 questions
 Setup reports for bursting 60 minutes
(3 questions, 6%) passing score: 74%
–7: Distribute Reports through
Bursting
Introduction to
Business Analytics, and
Business Intelligence
What is Analytics?
 Analytics is using analysis capabilities to:

– Discover what is happening

– Determine why is it happening

– Predict what is likely to happen

– Prescribe the best action to take


11
Why analytics matter?

12
Analytics for Performance Management

Information Decision(s) Performance

• Accurate • All levels


• In time
• Complete

Business Intelligence
optimize or derive improved business performance

 Areas to improve?
– Acquire, grow, and retain customers
– Minimize/manage risk
– Optimize operations and reduce fraud
– Transform financial processes
13
Business Analytics - Turning Data Into Insight
Different needs for Business Analytics
 Difference executives use business analytics to achieve different goals

15
Business Analytics or Business Intelligence?
 Different points of views!
 Business Analytics
– Enterprise information
– Enterprise performance management
– Data warehousing Your Business Business
– Analytic applications Intelligence
– Business Intelligence
– Business risks
–…
 Business Intelligence
– Querying
– Reporting
Your Information
– OLAP
Management Technology
IBM Cognos Report Studio
Author Professional Reports
Fundamentals (V10.2.2)
B5A58
Table of Contents - B5A58
A) Overview of IBM Cognos BI
1. Introduction to the Reporting Application
2. Create List Reports
3. Focus Reports Using Filters
4. Create Crosstab Reports
5. Present Data Graphically
6. Focus Reports Using Prompts
7. Extend Reports Using Calculations
8. Use Additional Report Building Techniques
9. Customize Reports with Conditional Formatting
10. Drill-Through From One Report to Another
11. Drill-Through Definitions
12. Enhance Report Layout
A
Overview of Cognos BI
IBM Cognos Architecture

 SOA  Web interface  Web administration

UI Windows & Web-based interfaces

Tier 1:
Web server Web Server (Gateways)

Tier 2:
Applications Content Manager + Cognos BI + Dispatcher

Tier 3: Content SQL


Data DB2 Oracle ODBC JDBC …
Store Server
Example IBM Cognos Deployment
Editions of IBM Cognos
 Cognos Insight
– data discovery and planning
 Cognos Express
Download or try from
– add a server to share that insight, and AnalyticsZone.com
– create reports from larger data sets
 Cognos BI Enterprise
– combine insight with real-time & corporate information, and
– place insights on scorecards, and
– interact on mobile devices

 Comparisons (informal)
– Product Comparison Matrix – IBM Cognos Express and IBM Cognos Business
Intelligence (BI)
– The difference between Cognos Express and Cognos Enterprise
22
Common Cognos Workflow

Model Package Author

• Framework • Report Studio


Manager • Workspace
• Transformer • Workspace
• Dynamic Advanced
Cube
Designer

23
The Role of an IBM Cognos Metadata Model

Metadata model provides a business presentation


view of data sources.
BI users use the model to analyze and report on
their data sources.
Reporting Layer

IBM Cognos Metadata Model

Relational Files Other


Cubes
Delivery Process of BA Projects
 Business Analytics Solution Implementation Method (BASIM)
– Previously: Cognos Solution Implementation Method (CSIM)

 Download:
https://www14.software.ibm.com/webapp/iwm/web/pick.do?source=swerpba-basimext
OLAP Data Structures - Cube

Fax
Telephone Camping Equipment
Members Mail
E-Mail Golf Equipment
Web
Cell Outdoor Protection
Order Methods
Mountaineering
Equipment
Dimension
Personal
Accessories

Jan Feb ...


Products
Q1 Q2 ...
2005 2006 ...

Hierarchy/Levels
2005 Q1 Q2 Q3 Q4
Time
Entities in Different Data Structures

OLAP/DMR Relational

Product
TrailChef Water Bag
Members TrailChef Canteen
TrailChef Kitchen Kit

Product
Aloe Relief
Values Astro Pilot
Auto Pilot
Relational Models: Operational vs. Reporting
 Requirement: Show all customer types that bought from a product line.

Relational = Operational Dimensional = Reporting


Customer Sales Product
Type Area Line Sales
1..1 1..1 1..1 Rep
1..n 1..n 1..n 1..1
0..n
Sales Product
Customer Order
Rep Type Customer 1..1 1..1
Product
1..1 1..1 1..1
0..n
Fact 0..n

1..n 1..n 0..n


1..1
Order
Product Date
1..n
Header
1..1 1..1
1..n

Order
Detail 1..n
Sample Outdoors database,
models, and packages

29
Sample Databases

Database Data Structure


GO Sales (GOSALES) Contains principally sales data Transactional database
GO Data Warehouse •HR Reporting database
(GOSALESDW) •Sales and marketing (warehouse)
•Finance

30
Sample Packages

Package Type Source database/cube


Go Data Warehouse (analysis) DMR GOSALESDW
Go Sales (analysis) DMR GOSALES
Go Data Warehouse (query) Relational GOSALESDW
Go Sales (query) Relational GOSALES
Sales and Marketing (cube) OLAP sales_and_marketing.mdc
Great Outdoor Sales (cube) OLAP great_outdoors_sales_en.mdc

31
Delivering the Homework
 Use IBM Cognos BI on the cloud
 ibm.biz/cognosBI
Username: Administrator
Password: IBMDem0s
 Once finished, send the report
specification as XML file
(Tools > Copy Report to Clipboard)
 Paste in a text editor (e.g. Notepad)
 Save as YourName_HomeworkNo.xml
 E-mail the file to the instructor/assistant
32
Browser Configuration
 Control Panel > Internet Options
– Security > Internet > Custom Level
 Miscellaneous:
 Include local directory path when uploading files to a server: Enable
 Scripting:
 Allow programmatic clipboard access: Enable
 Enable XSS filter: Disable
– Privacy > Popup-up Blocker > uncheck Turn on Pop-up Blocker
– IE11 (for Administration only): Tools > Compatibility View Settings > Add
 Disable Pop-up Blocker
– Chrome:
 chrome://settings/content
 Pop-ups > Allow all sites to show popups
– Firefox
33
1
Introduction to the
Reporting Application
TOC
Report Studio
 Web-based report authoring tool
 Ways of launching Report Studio
– Report Templates
 Explore the environment
– Toolbar
– Content Pane
– Properties Pane
 Select Ancestor
– Explorer Bar
 Page Explorer
 Query Explorer
 Conditional Explorer
 Page Design
 Page Structure
– Work Area

35
Relational vs. Dimensional/DMR Sources
GO Data Warehouse (query) GO Data Warehouse (analysis)
Namespace
Facts / Measures

Query
Dimension
Subject
Hierarchy
Query
Level
Item

Members
36
Demo 2: Create a Report from DMR Data Source
 Dimensionally-Modelled Relational (DMR) models extend dimensional capabilities
to relational data sources

 Allow drill-down and drill-up in hierarchies

37
2
Create List Reports

TOC
Demo 1: Enhance a List Report
 Undo
 Automatic group and summary behavior for lists
 Grouping, group span
 List page header and Overall header
 List column body, List column title, List Column

39
Demo 2: Data Aggregation
 Aggregate Function: aggregates data at the lowest level of detail
–Applied by data modeler at the model
–Applies only when Auto Group and Summary is Yes
–Automatic: based on data type (Integer: Total, …etc)
–Summarize: same as model

 Rollup Aggregate
–Applied by report author to grouped items
–Provides higher level aggregation

40
Demo 3: Create Multi-Fact Query in a List
 Use shared (conformed) dimensions to create multi-fact queries

now depends on year

related related
unrelated related

41
Add Repeated Information to Reports
 Repeater Table  Repeater
– Repeat items in a table structure – Duplicate items across a single
row without a particular structure

 Example: 3 columns and 2 columns  Example: Each record in a block

42
3
Focus Reports Using
Filters
TOC
Detail Filters - Before & After Auto Aggregation
 Before Auto Aggregation
– Generates a Where clause (filtering detail records)
Select Name, Revenue
From Products
Where Revenue > 10

 After Auto Aggregation


– Generates a Having clause (filtering summary records)
Select Name, Sum(Revenue)
From Products
Group By Name
Having Sum(Revenue)>1000
Detail Filters and Summary Filters
 Detail filter
– Filter a report only on detail data items, none of the data items in a detail filter are
summary data items. Examples: product, order number, and customer name.
– Applies conditions to each row of data. If the conditions are true for a row, the row is
retrieved and appears in the report; else the row is not retrieved and does not appear in
the report.
– Generate Where/Having clauses in SQL (depending on before/after auto aggregation)
 Summary filter
– Filter summary data items in a report.
– Before you create a summary filter, you must calculate the summary data items that you
want to use in the filter.
– Summary data items that you include in the filter are calculated before the filter is
applied while summary data items that aren't in the filter are calculated after the
summary filter is applied.
– Generate Having clauses in SQL
Apply Pre-defined Filters
 Defined in the package by metadata modeler

 Advantages:

–Reuse

–Encapsulation

46
Homework #1 – Sorting & Formatting

 List countries, genders, and salaries for countries


that exceeded 300,000$ in salaries of 2012
 Sort countries by Salary DESC,
and their details by Gender DESC
 Show salary as number, in thousands, with one
decimal place
 What is the Aggregate Function of Salary?

 Hints
–Package: GO Data Warehouse (query)
–Namespace: HR (query) >
47 Employee Summary (query)
4
Create Crosstab Reports

TOC
Crosstab Reports
 Add query items to edges, add measures to the body (intersection) or edges
 Usage: Analyzing and comparing summarized numeric data in rows and columns
 You can override the default measure of the crosstab
 Crosstabs are, by design, dimensional reporting objects
 Use drop zones to add parents, peers, and children

Edges
Default
Measure

Intersection
(Fact Cells)

49
Crosstab Nodes
A crosstab node contains one or more crosstab
node members

This crosstab node


contains two crosstab
node members:
Region and City.

50
Demo 1
 Pivot list to crosstab
 Swap Rows and Columns

51
5
Present Data Graphically
A picture is worth a thousand words

TOC
Different Chart Options
 Default and Legacy Charts

Default Charts Legacy Charts


Common Chart Objects
Demo 1: Clustered Bar and Stacked Area

Query Calculation
Total([Revenue])
Demo 1: Apply Palettes & Add Baselines
 Palette
–Borders
–Background
–Foreground
–Pattern
(useful for
printing in B&W)
 Baseline
Help consumers to
quickly identify
targets / thresholds
–Constant
–Data-driven

56
Demo 2: Gauge Chart with Beveled Border
Demo 2: Pie with 3-D Effects and Rounded Bevel

58
Microcharts
 Microcharts (module 5, demo 3)
– smaller versions of column, bar, and line charts
– can be used in crosstabs and dashboards.

59
Demo 3: Requirements…
 Show Revenue and Quantity by Product line and Region.

 Focus on Camping Equipment, Mountaineering Equipment, and Personal


Accessories sales for the three European sales regions

 Use a Crosstab & Combination Chart to report the same information


 Add a micro chart to the crosstab for a quick overview of specified regions
and product lines

60
Demo 3: Final Output

61
Demo 3: Design
 Query items:  Focus (filter) data: Combined filter (AND)
– Rows: Retailers: Region – Region: all Europe
– Columns: – Product line:
 Products: Product line  Camping Equipment
 Sales fact: Revenue, Quantity  Mountaineering Equipment
 Personal Accessories
 Combination chart:
– Clustered Bar & Clustered Line (default)  Add a microchart to the crosstab
– Use same query as the crosstab – Region > Insert Chart for Row Data
– Default Measure (y-axis): Revenue
 Show Revenue & Quantity on different axes
– Delete Quantity
– General > Combinations >
Secondary Axis > Line
– Move (Region > Quantity) to secondary
access

62
Customize Charts
 Color schemes
 Axis scale
 Fill & Background
 Tooltips
 Notes
(hide whatever is under
them)

63
RAVE: Rapidly Adaptive Visualization Engine
 Uses visJSON language
to describe the
visualization

 Flexible and extensible

 Interacts with animations


Demo 4: Display Visualizations
 Add a Visualization > Bubble > Packed bubble
See Also
 Choosing a Chart Type and Configuration
(Cognos Business Intelligence 10.2.2>Author and Create>Report Studio User Guide
10.2.2>Charts>Chart Types>Choosing a Chart Type and Configuration)
http://www-
01.ibm.com/support/knowledgecenter/SSEP7J_10.2.2/com.ibm.swg.ba.cognos.ug_cr_rptstd
.10.2.2.doc/c_ti_charts_cnfgs_tbl.html
 More Visualizations
http://www.ibm.com/web/portal/analytics/analyticszone/downloads/filter/?cV=/AnalyticsZone
_Content/AZCatalog/Visualization
 IBM Cognos Report Samples using Visualizations
 RAVE: Customize and Apply Visualizations
https://www-
304.ibm.com/connections/blogs/basupportlink/entry/customize_and_apply_visualizations

66
Use of Types of Reports Product Line Year Revenue
Camping Equipment 2006 $500,382,422.83
 List Camping Equipment 2007 $352,910,329.97
– Present tabular information Golf Equipment 2006 $174,740,819.29
– Show detailed information from the DB Golf Equipment 2007 $230,110,270.55

 Repeater Table Revenue 2006 2007


– Repeating a layout Camping Equipment $500,382,422.83 $352,910,329.97
horizontally & vertically
Golf Equipment $230,110,270.55 $174,740,819.29
 Crosstab
– Analyzing and comparing
summarized numeric data
in rows and columns
 Chart
– Present data graphically
– Comparisons, relationships, trends
67
6
Focus Reports Using
Prompts
TOC
Prompts and Parameters
 Prompts ask the user to provide the value for a parameter
that will be used in the report (probably in a filter)
 Ways of creating prompts:
1) Use an unassigned filter (will generate an appropriate prompt based on the model)
2) Create a prompt page by selecting columns & clicking the Build Prompt Page button
3) Use a prompt item (in a prompt page or a report page)
 Prompt types
 Localizable properties: Header Text, …etc
 Adding Report/Prompt Pages to a report
 Creating a cascading prompt
 Add Static Choices to a prompt

69
7
Extend Reports Using
Calculations
TOC
Objectives
 Create calculations based on data in the data source
– Query Calculation
 Add run-time information to the reports
– Layout Calculation
 Create expressions using functions
 QoS indicators

71
Some Common Functions – Numeric
Function Description
cast ( expression, datatype) Converts expression to the specified datatype
floor ( numeric_expression ) Returns the largest integer ≤ numeric_expression
mod ( integer_expression1, Returns the remainder (modulus) of
integer_expression2 ) integer_expression1 / integer_expression2
Some Common Functions – Date/Time
Function Description
current_date Returns the current date of the database engine
current_time Returns the current time of the database engine if
it supports this function. Otherwise, the current
time of the Cognos BI server
extract ( datepart , Returns an integer representing the value of
datetime_expression ) datepart (year, month, day, hour, minute, second)
in datetime_expression
_first_of_month Returns date_expression with the day set to 1
(date_expression)
localtime Returns current time of the database engine
Some Common Functions – Text
Function Description
char_length (string_expression) Returns number of logical characters in
string_expression
position ( keyword, text ) Returns the integer position of keyword in text, or
0 if not found
substring ( text, start_position, Returns the substring of text that starts at
num_of_chars ) start_position for num_of_chars characters.
First position in text is 1
trim ( [ [trailing|leading|both] Returns text trimmed of leading or trailing blanks
[chars_to_remove] , ] text ) or trimmed of a certain character specified in
"chars_to_remove".
"Both" is the default for first argument.
" " is the default for second argument
upper ( string_expression ) Returns string_expression in uppercase
Some Common Functions – Summaries
Function Description
percentage ( data_item ) Returns the percentage of total for data_item
total ( data_item ) Returns the total value for data_item
running-count ( data_item ) Returns the running count by row, for data_item
QoS Indicators
 Data modeler can set a quality of service (QoS) indicator (icon beside the
function) to indicate behavior of functions
 Report authors use QoS indicators to determine which function to use
Symbol Indicator Meaning
X Not available Not available for any data source in the package
!! Limited The function is not available for some data sources in
availability the package
! Poor The function is available for all data sources in the
performance package but may have poor performance in some data
sources
(no symbol) Unconstraint The function is available for all data sources

76
Demos
Add calculations to a report Display Prompt Selections in Report Title

77
8
Use Additional Report
Building Techniques
TOC
Enhance report design with report objects
 Set properties at highest level (property inheritance)
 Avoid fixed-size objects
 Use headers and footers to repeat on each page
Box Model
 Use Padding, Margin, and Blocks for spacing
 Use a Table to organize objects
 Sections (vs. headers)

79
Reuse Objects/Layout
 Reuse objects
–Layout Component Reference
–within a report / between separate reports

 Report templates
–Convert a report to a template

80
Handle Reports with No Data Available
 Hide the whole page if a data container is empty
–Render Page when Empty
 Yes
 No

 Replace an empty data container


–No Data Contents
 Don’t display
 Specified text
 Content specified in the No data tab
81
Homework #2 – Vacation Alert
 List employees who took vacation days ≥ a number that is specified by the
user in a text box on a previous page.
 If user’s condition is not met (minimum vacation days), then list users with
vacation days ≥ vacation days by user - 10
 Group by vacation days
 Sort by vacation days descending, then by employee names ascending
 Summarize by count of employees Testcases
 Other filters: Year: 2013
 Hints Vacation Days # of Employees
– Package: GO Data Warehouse (query) 0 696 (all employees)
– Namespace: HR (query) >
Employee Summary (query) 25 6
32 1
82 33 8
Homework #2 – Required Output

83
9
Customize Reports with
Conditional Formatting
TOC
10
Drill-Through From One
Report to Another
TOC
Homework #3 – Employee Expenses Dashboard
 Design a dashboard that includes (on the same page):
– 3D Pie Chart with Rounded Bevel: Branch region, Expenses (M$)
– Crosstab: Branch region, Gender, Month, Expenses (K$)
 Sort regions by total expense DESC, and months ASC
 Global filter: Year = 2013
 Interaction:
– Clicking a region on the pie or the legend filters the crosstab by the region,
and explodes that region in the pie chart
– Clicking Reset Filters in the crosstab corner resets filters
 Hints
– Package: GO Data Warehouse (query)
– Namespace: HR (query) > Employee expense (query)

86
Homework #3 – Required Output

87
11
Drill-Through Definitions

TOC
Navigate to Related Data in Cognos
 Can setup drill-through access to and from
– Report Studio reports
– Query Studio queries
– Workspace Advanced queries,
– and Analysis Studio analyses..
Using dimensional and relational data sources
 Can also setup drill through access
–from third party sources to Cognos, and
–from Cognos to third party targets
By URL requests or by using the SDK
89
Package-based Drill Through
From
relational/dimensional
sources

Sources using the GO Data Warehouse (analysis) package

Analysis Studio Query Studio Workspace Advanced Report Studio Event Studio
analysis query report report agent

Using a drill-through definition Target


created for the same package Report

To targets created from


relational/dimensional
sources
Demo 1: Set up drill-through for a package
 As Branka Hirsch (Report Administrator), let users navigate
to detailed product line sales from reports using GO Data
Warehouse (query)
 Target report to display data for the Product Line from which
users drill through
–Public Folders\Samples_Drillthrough\Models\
GO Datawarehouse (query)\
Report Studio Report Samples\Total Revenue by Country
 Source report: created by Cognos Workspace Advanced
 Use Drill Through Assistant to view values that are passed
91
12
Enhance Report Layout

TOC
Objectives
View the Structure of the Report
Force Page Breaks in Reports
Horizontal Pagination
Modify Structures – Lock/Unlock
Change PDF Page Orientation
–Override the page setup for this page
Set PDF Security Options
Format Objects Across Reports - CSS
Force Page Breaks in Reports
1) Add a Page Set
2) Associate it to the query
3) Set Grouping and Sorting
4) Drag the page under Details of the Page Set
 Demo 1
Horizontal Pagination
 PDF, List and Crosstabs only
 Add horizontal page numbers
1) Preset (using Number Style)
2) Custom Number Style
3) Report Layout Functions
 Demo:
–Freeze columns
–Page Number: Custom number style
–HorizontalPageCount()
–PageNumber()
–mapNumberToLetter ( char , int_offset )
–number2string( number_expression )
Securing a PDF Report Output
 Require a password to open the PDF output
–Run with Options > Advanced Options
 Run in the Background
 Format: PDF, set options:
 Check “Requires a password to open the report”
 To prevent copying from PDF output:
–Run with Options > Advanced Options
 Run in the Background
 Format: PDF, set options:
 Check “Requires a password to access options”
 Uncheck “Copy of text, images, and other content”

96
Homework #4 – Highlighting Search Results

Product marketing team want to ensure that the


proper messages are reaching the customers
IBM Cognos Report Studio
Author Professional Reports
Advanced (V10.2.2)
B5A59
Table of Contents - B5A59
1. Create Query Models
2. Create Reports Based on Query Relationships
3. Create Advanced Dynamic Reports
4. Design Effective Prompts
5. Create Additional Advanced Reports
6. Examine the Report Specification
7. Distribute Reports Through Bursting
8. Enhance User Interaction with HTML
1
Create Query Models
Objectives
 Build query models and then connect them to the report layout
 Add calculated items to queries
 View Tabular Data of a query
 Navigate in Report Studio (Up, Forward, Back)
 Create/modify queries using SQL
 Add filters and prompts to a report using the query model
– e.g. filtering a query based on data from another query
Demos
 Build a Query and Connect it to a Report:
– Product line, Product type, Revenue, Projected Revenue (1.07 * Revenue)

 Create a report using an SQL statement


– Show Generated SQL/MDX
– Save to a text file
– Create a query using SQL statement (and specify the data source)
– Rename query items and remove “For Fetch Only”

 Filter query data against data in a separate query


– Query1: get products generating revenue ≥ 150,000,000
– Query2: get quantity sold from those products, by country

102
2
Create Reports Based on
Query Relationships
Concepts
 Create reports by merging query results
–Set Operation objects
 Union: U
 Intersect: ∩
 Except: -
–Projection list: items to be picked up from each query
 Create reports by joining queries
 Combine data containers based on relationships from
different queries
Demo 1: Requirements

List sales reps who


generated revenue ≥ 18M
followed by
order methods that
generated a revenue ≥
20M
Demo 2: Query Relationships
List products that are
sold with a specific
product
(selected by the user)

–Example: Sun Shield


3
Create Advanced
Dynamic Reports
Query Macros & Session Parameters
 Query macro: an expression that is embedded directly in the SQL of a
query to alter the SQL at runtime
–prompt
–sq
 Better to be placed into the Framework Manager model, but you not have
access to the project
 Session parameters:
exposed by the authentication source (NTLM, LDAP, ..etc)
$account.defaultName
$runLocale

108
1: Filter report on session parameter values
 Session parameters are made available by authentication source (e.g. LDAP)
Example: account.defaultName
 Filter:
[Employee name]=# sq ($account.defaultName) #
(to see the filter: show [Employee name] column)
 Set Page’s query to Query 1
 Add a Layout Calculation after report header:
[Query1].[Employee name]

 Pick up style of header


& apply style to the Layout Calculation
 Run with user: smythed
2: Navigate Reports with Links
 Navigate reports using a Table Of Contents (TOC)
– Quickly navigate to: grouped items, sectioned
items, or multiple pages
– TOC entries are static or data-driven
– Only for PDF or saved HTML output
2: Navigate Reports with Links
 Tabbed reports in HTML & Excel (report properties)

 Add custom links for better navigation (e.g. Top link)


3: Create Dynamic Data Items and Titles
 Use calculated data items to:
– create dynamic column titles and report titles
– display user prompt selections

 Demo
Dynamic titles set by a prompt

Dynamic
calculation
4: Navigate to details in the same report
 You can create a report that drills through to itself to let users select an item from a high-
level list and view its details in a separate list.
4
Design Effective Prompts
2: Create a Prompt to Allow Selection Between
Filters
 Filter:
# prompt ('Chosen Filter', 'token', '[Date] between 2012-
01-01 00:00:00 and 2012-12-31 23:59:59') #
 Value Prompt Use Display
– Static Values
[Date] between 2012-01-01 00:00:00 and All orders in 2012
2012-12-31 23:59:59
Cast([Date],date)=2012-09-30 Last day 3rd quarter
[Date] in_range ?date_range? Date range

 Date Prompt
– Parameter: date_range

115
5
Create Additional
Advanced Reports
Create Additional Advanced Reports
Display summaries before details Display Single Data Value
 Split table cells (in a list header)  Use Singleton to display
summarized information
 Move summaries from footer to
header

117
Highlight Alternate Rows

running-count([Employee name])
List Columns
Body Style
118 mod(running-count([Employee name]),2)
Use External Data
 When required data is not in the package, nor in any data source
 Examples:
–Currency exchange Web service that sends Excel data sheets on daily
basis
–External legacy system that produces CSV files on monthly basis

 Solution:
–Extend existing packages with new query subjects
(Manage External Data)

Remember: A report can refer to one package only at a time


119
6
Examine Report
Specification
Objectives
 Contents of report specification
 Report specification flow
 Report specification structure
– Header (model, language, namespace)
– Queries
– Layouts (prompt pages, report pages, styles)
– Report variables
 Modify a report specification (considerations)
 Create custom toolbox and template objects
121
Toolbox Controls and Templates
 Toolbox control:
–Add code to: ToolboxControls.xml
–Add reference to it in: Toolbox.xml

 Template:
–Add code to: templates.xml
–Add reference to it in: Resources.xml
7
Distribute Reports
Through Bursting
Objectives
 distribute reports using bursting
 create burst keys
 identify report recipients and data items
using burst tables
 distribute reports using email and IBM
Cognos Connection
Bursting Reports - Steps
1. Prepare burst recipients in Reports
Studio
2. Set burst options in Report Studio
3. Run the report in IBM Cognos
Connection with bursting enabled

125
Step 1: Prepare Burst Recipients
 Burst to directories and/or e-mail
 E-mails from:
– Authentication source / Cognos profile
– Data source
– A calculated field
– Burst table column
126
Step 2: Set Burst Options in RS
 Group the report on the data item to burst
on (optional)
 Burst groups: how to separate data?
 Burst recipient: who receives the subset
of data?
 Burst key: map burst groups to recipients
127
Existing users in Domino Server (mail server)
First Name Last Name Internet Address
Admin Person admin@grtd123.com
Donald Chow DChow@grtd123.com
Frank Bretton FBretton@grtd123.com
Bart Scott BScott@grtd123.com
Dave Smythe DSmythe@grtd123.com
John Sinden JSinden@grtd123.com
Alessandra Torta ATorta@grtd123.com
Branka Hirsch BHirsch@grtd123.com
128
Step 3: Run with bursting enabled
Run as Frank Bretton
Run with Options (advanced options)
–Run in the background
–Bursting: Burst the report
–Delivery: Save & Send by email

129
Demo 1: Burst to e-mail using data item
 Filters:
[Employee name]
in ('Bart Scott',
'Alessandra Torta',
'John Sinden')
 Include Email in
Query1 & in
Properties of List1
 Burst to Email
addresses
Step 2: Set Burst Options in RS
Bursting a Dimensional Container
 Use burst key with one dimension data container (List)
 For multiple dimensions containers (chart/crosstab..)
–create a master detail relationship between this query
and a single dimensional query
–add the burst
key to the single
dimensional
query.

132
8
Enhance User Interaction
with HTML
Your feedback really matters…
See Also..
 AnalyticsZone channel
 Save Current Prompt Values with Report View
 Setting up the IBM Cognos Audit database and sample reports -
YouTube
 Book: IBM Cognos 10 Report Studio: Practical Examples
 IBM Professional Certification Program www.ibm.com/certify

136
Cognos Active Reports
Why Active Reports?

Interactivity Performance Disconnected Distribution

Authoring: Report Studio


What is an Active Report?
 A report type whose output is HTML / MHT
 Viewable by
– Preview (in Report Studio)
– Report Viewer in Cognos Connection
– Downloadable file
– Cognos Mobile
Active Report Controls

Static or data-driven
Interactive Behavior
 Three reactions are available through Reaction behavior property:

– Select an item in a control

– Filter item
in a control

– Control enable

variable
Demo 1: Using Static and Data Controls
Converting a Report to an Active Report
File > Convert to Active Report

Unsupported objects will be removed


–Prompt controls
–Table of contents
–Table of contents entries
–Bookmarks

143
Active Report Properties
 Window Title
– Default + more titles (translations)

 Security
– A password (access key) can be added to an Active
144
Report on a report-by-report basis
Debugging Active Reports
 The debug feature is turned on by default

 Located in the Run Options

 Debug menu is activated by


right-clicking the report

145
Interactive Behavior Properties
 Summarize in Output - show the summarized value for what is displayed in the active report
 No Value List Item: default list item (data item = null)
 Allow Sorting
 Column Visibility

146
Demo 2: Using Data Deck Control
See Also..
 IBM Business Analytics Proven Practices: IBM
Cognos Active Report 10.2 Cookbook
 B5298G: IBM Cognos Report Studio: Author Active
Reports (V10.2)
 101 Tips and Tricks for Active Reports
 Samples
– IBM Cognos Active Report - Product details
– Sales Staff Network Active Report
148

Potrebbero piacerti anche