Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
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
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)
12
Analytics for Performance Management
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
Tier 1:
Web server Web Server (Gateways)
Tier 2:
Applications Content Manager + Cognos BI + Dispatcher
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
23
The Role of an IBM Cognos Metadata Model
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
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.
Order
Detail 1..n
Sample Outdoors database,
models, and packages
29
Sample Databases
30
Sample Packages
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
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
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
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
Advantages:
–Reuse
–Encapsulation
46
Homework #1 – Sorting & Formatting
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
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
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.
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
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
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
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
Analysis Studio Query Studio Workspace Advanced Report Studio Event Studio
analysis query report report agent
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
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
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]
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)
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?
Static or data-driven
Interactive Behavior
Three reactions are available through Reaction behavior property:
– 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
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
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