Sie sind auf Seite 1von 24

Guideline

IBM Cognos Planning as a Data


Source for IBM Cognos BI Reports
Product(s): IBM Cognos Planning, IBM Cognos BI
Area of Interest: Modeling
IBM Cognos Planning as a Data Source for IBM Cognos BI Reports 2

Copyright
Copyright 2008 Cognos ULC (formerly Cognos Incorporated). Cognos ULC
is an IBM Company. While every attempt has been made to ensure that the
information in this document is accurate and complete, some typographical
errors or technical inaccuracies may exist. Cognos does not accept
responsibility for any kind of loss resulting from the use of information
contained in this document. This document shows the publication date. The
information contained in this document is subject to change without notice.
Any improvements or changes to the information contained in this document
will be documented in subsequent editions. This document contains
proprietary information of Cognos. All rights are reserved. No part of this
document may be copied, photocopied, reproduced, stored in a retrieval
system, transmitted in any form or by any means, or translated into another
language without the prior written consent of Cognos. Cognos and the
Cognos logo are trademarks of Cognos ULC (formerly Cognos Incorporated)
in the United States and/or other countries. IBM and the IBM logo are
trademarks of International Business Machines Corporation in the United
States, or other countries, or both. All other names are trademarks or
registered trademarks of their respective companies. Information about
Cognos products can be found at www.cognos.com
This document is maintained by the Best Practices, Product and Technology
team. You can send comments, suggestions, and additions to
cscogpp@ca.ibm.com .

IBM Cognos Proprietary Information


IBM Cognos Planning as a Data Source for IBM Cognos BI Reports 3

Contents
1 INTRODUCTION ............................................................................................ 4
1.1 PURPOSE ............................................................................................................4
1.2 APPLICABILITY .....................................................................................................4
2 IBM COGNOS PLANNING AS A DATA SOURCE .............................................. 4
2.1 DATA ACCESS ......................................................................................................4
2.2 OBJECTIVES: .......................................................................................................5
2.3 WHAT DOES THE EXTENSION PROVIDE?........................................................................5
2.4 PUBLISHING THE CUBES ..........................................................................................7
2.4.1 Table-only or View Layout. .................................................................................7
2.4.2 Cube selection...................................................................................................7
2.4.3 Dimension for Publish ........................................................................................8
2.4.4 Which e.List items? ............................................................................................8
2.4.5 Table Options....................................................................................................9
2.5 GENERATED FRAMEWORK MANAGER MODEL EXTENSION ...................................................9
2.6 BASE MODEL AND USER MODEL............................................................................... 11
3 CUSTOMIZING THE FRAMEWORK MANAGER MODEL................................. 12
4 DRILLING TO CONTRIBUTOR ..................................................................... 12
5 PRESENTING CONTENT IN CONTRIBUTOR ................................................ 16
5.1 SUMMARY: ........................................................................................................ 16
5.2 OBJECTIVES: ..................................................................................................... 16
5.3 CREATING AND CUSTOMIZING PAGES ........................................................................ 16
5.3.1 Creating the Page ............................................................................................ 16
5.4 USER SPECIFIC CONTENT CONDITIONAL BLOCKS ........................................................ 19
5.4.1 How do they work?.......................................................................................... 19

IBM Cognos Proprietary Information


IBM Cognos Planning as a Data Source for IBM Cognos BI Reports 4

1 Introduction
1.1 Purpose
This document is designed to introduce attendees to the improvements in reporting
from IBM Cognos Planning and IBM Cognos 8 BI, focused on techniques to improve
presentation, navigation and enrich content. Demonstrations use a combination of
IBM Cognos Planning 8.1 and IBM Cognos 8 version 8.2

1.2 Applicability
IBM Cognos Planning 8.1 and IBM Cognos 8 version 8.2

2 IBM Cognos Planning as a Data Source


2.1 Data Access

To support high concurrency write back for complex multi-dimensional data,


Contributor uses a binary xml format for storage. IBM Cognos Planning provides two
basic mechanisms for exposing data from its application store. Publishing is the
process of moving data from the application store to a relational star schema
database as a point in time snapshot. The second method uses the Contributor Data
Server (CDS) to serve data to the IBM Cognos 8 MDDS adapter. Customers can
choose to publish data to take advantage of the extensibility and high performance
read access to relational data, or can use CDS to access the most up-to-date plan
data.

Publish
Plan Data Container

CDS Reports

Although the Contributor Data Server provides easy access to live data, published
data with a Framework Manager model will provide the most scalable, rich, and
robust reporting. This section will discuss the publish process, the metadata
delivered by the Generate Framework Manager model extension, and what you can
do to improve the model.

IBM Cognos Proprietary Information


IBM Cognos Planning as a Data Source for IBM Cognos BI Reports 5

2.2 Objectives:

Upon completion of this section, you will have successfully generated and modified a
model from published data using the Contributor extension. You will understand the
impact of Contributor model changes, and how to update and synchronize your FM
model.

2.3 What does the extension provide?

The Generate ReportNet/Framework Manager Model extension provided with IBM


Cognos Planning 7.3 MR1 has been vastly improved to support IBM Cognos 8
functionality. New (and old) features are listed below:

Dimensional over Relational Model (i.e. can be used for member/level based
reporting out of the box)

Sort Items built in (No need to define sort order for months, accounts, etc)

Security filters are built in based upon the e.List security in Contributor.

IBM Cognos Proprietary Information


IBM Cognos Planning as a Data Source for IBM Cognos BI Reports 6

Physical View & Business View with Star Schema Groupings and appropriate
joins

IBM Cognos Proprietary Information


IBM Cognos Planning as a Data Source for IBM Cognos BI Reports 7

2.4 Publishing the Cubes

One advantage that we have in creating Framework Manager models from


Contributor data sources is that for the most part, the database schema is almost
identical regardless of the application. This ensures that the techniques we use on
one publish schema are re-usable for any other models we encounter.

2.4.1 Table-only or View Layout.

The view publish exists only to support customer reporting environments which
previously consumed the view schema. Data in the view publish layout is published
as Varchar(8000) (or CLOB, or Varchar2(4000)) and does not act as a source for the
Framework manager model generated from Contributor. It is likely that this layout
will be deprecated in the future, and so should definitely not be used for new
reporting implementations. Specific benefits to using the table publish are:

table and column names that are restricted only by their respective database
limits

data is stored in either numeric, character or date columns depending on the


planning model type

data can be excluded based on data type

2.4.2 Cube selection

This is important but often overlooked step in the publish process. Ensure that you
select cubes that will actually be consumed in the reporting environment. There is
often a great deal of disparity in volumes between report worthy data and model
data, particularly when specific summary cubes already filter out key items for
reporting. Attention up front to the reporting needs will save lots of time when
publishing the data.

IBM Cognos Proprietary Information


IBM Cognos Planning as a Data Source for IBM Cognos BI Reports 8

2.4.3 Dimension for Publish

The most common dimension for publish to use is the one that will have formats and
calculations, or the number one D-List in the cube. By using this dimension, you can
take advantages of the following features:

Member Functionality you will not be able to use member functions like children,
sibling, etc on the dimension you choose (for example, e.List, Months, Product).

Data Type Conformance your data can be difficult to manipulate, as your columns
will all be formatted as varchar, or presented sparsely with a separate column for
each type.

Presentation - Keep in mind that measures do not appear hierarchically as well, so


the users will view this dimension in a flat list.

2.4.4 Which e.List items?

One thing about the e.List that makes it easier to manage than other dimensions
when reporting is that it is the one dimension that we can be certain has a simple
hierarchy. There is no need, in a DMR or OLAP model, to publish the total levels of
this dimension, so unless you are using only a relational model from the application,
choose the Select All Planners button.

Include Rollups

By deselecting include Roll-ups, all simple aggregations will be removed and data can
then be summed by the reporting tools. This can drastically reduce publish time
provided the reporting tool used is recreating these sums.

IBM Cognos Proprietary Information


IBM Cognos Planning as a Data Source for IBM Cognos BI Reports 9

Include zero or blank values

Off by default, and only really useful for publish databases which are the source for
data warehouses which need to update balances. This can setting can have a large
impact on performance in models that are sparse.

2.4.5 Table Options

Include User Annotations creates an an_cube table with any annotations that have
been added by the users to individual cells tab and model annotations are already
published separately to the annotation object table.

Include Audit annotations adds audit information for each cube to the same an_cube
table mentioned above.

2.5 Generated Framework Manager Model Extension

The extension also includes several options to allow you to customize the generated
output.

Firstly, you can decide which cubes you wish to include in the model. If you have
followed the previous advice of only publishing cubes which you intend to use for
reporting, you will likely select all cubes.

Secondly, you will choose which types of query subjects to create and include in the
model.

Unformatted Lists:

These are based on the it_dimensionname tables, and include information about the
dimension without hierarchies. These can be used quickly and easily to create a
relational model, and for several other techniques discussed later. You will likely
want to include them.

IBM Cognos Proprietary Information


IBM Cognos Planning as a Data Source for IBM Cognos BI Reports 1
0
Derived Hierarchy Lists:

These are based on the sy_dimensionname tables, and include hierarchy information
similar to the complete hierarchy tables, with the key difference being how the
hierarchies are constructed to handle complex calculations rather than simple sums.

Leaf codes are used to describe the dimension

0: Direct child of a simple sum node.


1: The leaf has multiple parents.
2: The leaf item is part of a sub-hierarchy and has been moved to the root.
3: The leaf item is an orphan.

Complete Hierarchy Lists:

Complete hierarchies (cy_dimensionname) are designed specifically for simple sum


hierarchies, or for use with products which can leverage externally rolled up
measures, such as Transformer. For more information on the differences between
the Complete and Derived Hierarchy lists, see the Contributor on-line help.

A comparison for the following D-List demonstrated a key difference between the cy
and sy tables:

CY table

SY table

In the above example, the complex calculated parent has been moved to the root in
the SY, as has its orphaned constituent and calculated constituent. Only 1 additional
level remains for the simple children of a constituent. This ensures fidelity for the
complex calc when used as a reporting source, but presents a flatter hierarchy.

IBM Cognos Proprietary Information


IBM Cognos Planning as a Data Source for IBM Cognos BI Reports 1
1

2.6 Base Model and User Model

The Generate ReportNet/Framework Manager Model extension actually provides not


one, but two models. The first model created is the Base Model this model should
not be modified or used at all. This is a buffer between model updates provided by
the extension for regular maintenance and any modifications that you make to the
user model.

The user model is created from the base model through importing (the extension
does this for you the first time). After the base model is imported, each change you
make is recorded in a script that can then be played back if you need to make the
changes again after importing a fresh copy of the base model.

When there are changes made in Contributor (additional cubes published, dimension
names changes, levels added to a dimension, etc) and you republish the data, you
will also need to update the base model (using the extension) and synchronize the
user model.

IBM Cognos Proprietary Information


IBM Cognos Planning as a Data Source for IBM Cognos BI Reports 1
2

3 Customizing the Framework Manager Model

Out of the box, the model you have can now be used with any studio, provides a
secure and scalable source for reporting and analysis, and can satisfy the needs of
most report authors. So what work is left to do? That depends largely on how you
use the model when used purely for member based Analysis and reporting, you
may not require any changes. If however, you plan on using it for level based
reporting and analysis, you will likely want to rename many of the generated level
names, and possibly the measures as well. Contributor, not using the concept of
levels, provides you with no facility to name the levels that it will generate for you
during the publish process.

4 Drilling to Contributor

So, youve created a rich, full content reporting and analysis solution for your
customer that has everything Business Intelligence can provide to help make
understanding the plan easier and gathering and executing the plan more efficient.

But there is something missing. The customer can see how his/her current plan
compares with previous plans; knows the top 10 variances between them, and the
reasons why, and is alerted when someone exceeds the thresholds that have been
defined. To change the plan however, he or she must log in to Contributor and find
the numbers that have to be changed.

IBM Cognos Proprietary Information


IBM Cognos Planning as a Data Source for IBM Cognos BI Reports 1
3
This section will show you how to add intelligence to your events and reports that
will allow consumers to traverse directly from the report or notification you send
them into the problem e.List item in the plan. The following report is an example of
how you can present both a deep understanding of key plan figures, and
simultaneously offer a quick navigation path for corrective action.

Tasks:

1. Open Framework Manager and create a new Query.

2. Add an item to the query called Drill Information.

3. Name the calculation based on the level it pertains to (to simplify adding it to
that level later on).

4. Enter the following in the calculation:

server url for


contributor/planning10.asp?yourapplicationid&multimode=0&item= +
[Model].[Unformatted list eList].[Dimension GUID] + [Model].[Complete
hierarchy eList].[Level 0 eList ID]

An example follows:
'http://vclassbase/cognos/contributor/planning10.asp?appid=sales&multi
node=0&item=' + [Model].[Unformatted list eList].[Dimension GUID] +
[Model].[Complete hierarchy eList].[Level 0 eList ID]

IBM Cognos Proprietary Information


IBM Cognos Planning as a Data Source for IBM Cognos BI Reports 1
4

5. Test the calculation to ensure you have entered it correctly.

6. Repeat for each level in the elist hierarchy (if you wish to drill from parent
level data directly to contributor

For example:

Regions

'http://vclassbase/cognos/contributor/planning10.asp?appid=sales&multi
node=0&item=' + [Model].[Unformatted list eList].[Dimension GUID] +
[Model].[Complete hierarchy eList].[Level 2 eList ID]

Salespeople

'http://vclassbase/cognos/contributor/planning10.asp?appid=sales&multi
node=0&item=' + [Model].[Unformatted list eList].[Dimension GUID] +
[Model].[Complete hierarchy eList].[Level 3 eList ID]

7. Test each one in turn to ensure the calculation is working.

8. Click on the Contribution Hierarchy and then click the Dimension Map tab.

9. Drag each level based drill into the dimension map in the appropriate location
(based on the level names you used when you created the drill calculations).
When prompted, select to use No Role.

10. Publish the Package.

11. Using report studio, create a new report in the style of your choice from the
toolbox, drag a hyperlink object to the report and then add your drill

IBM Cognos Proprietary Information


IBM Cognos Planning as a Data Source for IBM Cognos BI Reports 1
5
information (and elist item name) to the query. Specify the properties of the
url using the elist name as the text, and the drill information as the url.

By default, these
hyperlinks will open in
the same window as the
report for added
usability; insert an html
item from the toolbox
with the following text:
<base target="_blank">
This will open a new
window each time you
click the hyperlinks.

<base
target="anyname">
Will open a new window
the first time and will
reuse for subsequent
clicks.

12. When you run the report and click the URL, the following window should
open:

IBM Cognos Proprietary Information


IBM Cognos Planning as a Data Source for IBM Cognos BI Reports 1
6

5 Presenting Content in Contributor

5.1 Summary:

Throughout the course, weve developed attractive, rich content reports, analysis,
and events that add tremendous value to consumers. The focus of this section will
be on delivering this content in the most meaningful ways possible. This includes
merging some of the content to a dashboard, presenting it to end users while they
are navigating contributor, and building that content in the context of the particular
consumer.

5.2 Objectives:

Upon completion of this module, users should understand how to create pages,
incorporate multiple content sources, make the content user specific, and present it
in Contributor.

5.3 Creating and Customizing Pages

IBM Cognos Connection provides excellent facilities for users to create their own
pages with content specific to their needs. These pages can be used as dashboards
that drive rich content to a single location, without having to navigate though reports
and analysis to find what they need. The fact that these pages are independent of a
package or query means that this is one location where we can combine workflow
information with live data, so that users can not only see what the current plan is
shaping up to be, but also how complete it is. We will explore this functionality and
see what it can provide to the planning process.

5.3.1 Creating the Page

Pages are very easy to create in IBM Cognos Connection the hardest part is
deciding what to put on them. On the toolbar, click the New Page icon.

You then need to decide if you want to use multiple columns on the page. If we are
defining pages for the Instructions pane in Contributor web, keep in mind that real
estate is limited already by other items in the Workflow page. If however, you
designing these pages for Cube Specific help, or for IBM Cognos Connection itself,
you can use multiple columns without drastically affecting appearance.

IBM Cognos Proprietary Information


IBM Cognos Planning as a Data Source for IBM Cognos BI Reports 1
7

The next set of options is very important if we want to use this page for Contributor.
Adding a title can be nice, but when the report renders in Contributor, it usually
looks cleaner without it. Borders, the toolbar, and edit buttons should definitely be
removed in the final product, but not yet removing them now will prevent you from
being able to add the content.

IBM Cognos Proprietary Information


IBM Cognos Planning as a Data Source for IBM Cognos BI Reports 1
8

To bring these pages to life, we can present them in Contributor, designed for
specific users and cubes. First, well take a look at how we can make these pages
dynamic for each user.

IBM Cognos Proprietary Information


IBM Cognos Planning as a Data Source for IBM Cognos BI Reports 1
9

5.4 User Specific Content Conditional Blocks

Have you ever been asked to show a separate Instructions pane depending on the
user or the e.List review level? Although Contributor provides static presentation in
the instructions and cube help, Report Studio has some excellent controls for
providing exactly this functionality, and when we combine this with the next
technique for using iFrames or redirect links in Contributor, we can deliver exactly
what users want to see, right in the Workflow Instructions pane. To design user
specific content we will use conditional blocks.
5.4.1 How do they work?

Conditional blocks manage what is displayed based on the value of a variable that
we define. In our case, we create a calculation that uses a session variable called
account.defaultname to return the current user that is running the report. The block
checks the value of this variable and only display the items that are associated with
that condition.

1. Open Report Studio using the Sales Plan Generated package and create a New
Blank Report.

2. Open the Query Explorer, click Queries, and drag a new Query from the
toolbox to the query window.

3. Double-click Query1, and drag a Data Item from the Toolbox to the Query.

4. Double-click Data item and enter the following expression (exactly, and it is
case sensitive):

#sq($account.defaultName)#

5. Set the Name property of the data item to User Click the Page Explorer
and click Page 1.

6. Click the Page Body to highlight it, and then select the ancestor button to drill
up from the Page Body to the Page:

IBM Cognos Proprietary Information


IBM Cognos Planning as a Data Source for IBM Cognos BI Reports 2
0
Alternatively, you could switch to the Page Structure view and Highlight the
root Page Page 1

7. Set the property for Query to Query1.

8. From the Toolbox, drag a Conditional Block control to the Report.

9. Highlight the Conditional Block and browse on the property Block Variable.

10. From the Block Variable Window, select New String Variable.

11. Enter the name Username, click Add, and type the user name exactly as it is
defined (these are case sensitive as well)

12. Repeat for the items below until your New Variable window appears with all
of the appropriate users. An example follows:

IBM Cognos Proprietary Information


IBM Cognos Planning as a Data Source for IBM Cognos BI Reports 2
1

This creates a block for each variable you enter blocks will hold report
objects that only display when the variable we define matches.

13. Click OK.

14. The Report Expression dialog appears drag User to the Expression
Definition Pane.

15. Click OK, and then in the Properties pane, change the Current Block value to
whichever user you want to define content for (Other will be the content for
any user not named explicitly in the conditional style)

16. Placing objects within the conditional block will allow you to design reports
specifically for any of the users youve named, and to add default content for
others. You can switch the current block variable at any time to build for each
user, and you can open the conditional explorer to add others at any time.
Remember that security filters will manage the data being exposed as well, so
you may want to query all members and let security filter the users view rather
than trying to guess which members are visible for which users.

Presenting the Report in Contributor


Inline Frames or iFrames as they are known are extremely useful tool to present
content directly within the Contributor Instructions pane, or in the Help pages
associated with each cube in the model. They are not only an excellent presentation
medium, they also allow you to create content more quickly and efficiently since
once you add the iFrame pointing to the page, you can modify the page itself (with

IBM Cognos Proprietary Information


IBM Cognos Planning as a Data Source for IBM Cognos BI Reports 2
2
no GTP required). Alternatively, html redirect snippets can also provide a simple
means of presenting your report content directly in Contributor.

To use an IFrame, add the following to your Contributor Help Text:

<html>
<body>
<div>
<iframe src="the url of your report"style=width:1100px;
height:800px"></iframe>
</div>
</body>
</html>

To alternatively use a redirection to alternate page:

<meta http-equiv="REFRESH" content="0;url=the url of your report">

Some useful tips here:

To get the url of a report, click the report properties, then click View the
search path, ID and URL copy and paste your url to the appropriate location
in your Contributor Help Text or redirection snippet.
You can use the same techniques for each cube in the model as well as for
the Instructions frame in the Workflow page.
If your report content includes drill hyperlinks, ensure that you add the html
to open those links in a new window: <base target="_blank">
This technique works well for pages also define an entire dashboard for
your users and deploy it within Contributor
If you wish, you can remove header content from the page by appending the
following to the report url:

&ui.header=false

IBM Cognos Proprietary Information


IBM Cognos Planning as a Data Source for IBM Cognos BI Reports 2
3
Appendix A Workflow Information
To add workflow based reporting to your existing published data, import metadata
from the application container (not the publish container), specifically, the nodestate
table. Items of interest from the nodestate table include:

Nodeguid
Stateid
StateDateTime
DataDateTime

Join Nodeguid to the dimension table of your choice (it_table is an easy start) using
a 1:1 -> 1:1 relationship from nodeguid to item guid.

Note that this is a cross database join, and will require the package to allow limited
local processing (on by default) and may slow performance over models with a large
elist dimension.

The following are a series of transformations useful for this data:

To translate state ids to logical names:

CASE [Model].[nodestate].[stateid]
WHEN 0 THEN 'Not Started'
WHEN 1 THEN 'Incomplete'
WHEN 2 THEN 'In Progress'
WHEN 3 THEN 'Ready'
WHEN 4 THEN 'Locked'
END

To translate state ids to images (replace contributor server url with you own):

CASE [Model].[nodestate].[stateid]
WHEN 0 THEN 'server url/IMAGES/WORKFLOWICONS/Normal/1nsnormal.gif'
WHEN 1 THEN server url /IMAGES/WORKFLOWICONS/Normal/2incnormal.gif'
WHEN 2 THEN server url /IMAGES/WORKFLOWICONS/Normal/3wipnormal.gif'
WHEN 3 THEN server url /IMAGES/WORKFLOWICONS/Normal/4readynormal.gif'
WHEN 4 THEN server url /IMAGES/WORKFLOWICONS/Normal/5locknormal.gif'
END

To translate statedatetime (or datadatetime) to standard time format:

IF ( [Model].[nodestate].[statedatetime] = '0000-00-00T00:00:00.000+00:00' )
THEN ( NULL )
ELSE (cast_timestamp ( substring ([Model].[nodestate].[statedatetime] , 1, 10) + ' '
+substring([Model].[nodestate].[statedatetime] ,12,8)))

IBM Cognos Proprietary Information


IBM Cognos Planning as a Data Source for IBM Cognos BI Reports 2
4

IBM Cognos Proprietary Information

Das könnte Ihnen auch gefallen