You are on page 1of 8

Copyright IBM Corporation 2013

Trademarks
IBM Business Analytics Proven Practices: Case Study - MigratingBO Reports to IBM
Cognos BI without Universe Files
Page 1 of 16
IBM Business Analytics Proven Practices: Case Study- Migrating BO Reports to IBM
Cognos BI withoutUniverse Files
Product(s): IBM Cognos 10.1.x, 10.2.x; Area of Interest: Upgrade andMigration
Yan Fang Ji
Software Developer
IBM
Lian Li
Software Architect
IBM
Yang Zhang
Software Engineer
IBM
06 September 2013
A process to help migrating Business Objects reports into an IBM Cognos BI envir
onment whenthe Business Objects universe file does not exist.
View more content in this series
Introduction
Purpose of Document
This document provides a technical summary of how to migrate SAP Business Object
s (BO)reports to IBM Cognos BI without the BO Universe project files. It covers
the primary workflow ofthe migration activities and points out multiple items to
consider and watch out for as a result of thecomplexity and difficulty of the m
igration process.
Applicability
This document applies to IBM Cognos BI versions of 10.1.x and 10.2.x.
developerWorks
ibm.com/developerWorks/
IBM Business Analytics Proven Practices: Case Study - MigratingBO Reports to IBM
Cognos BI without Universe Files
Page 2 of 16
Exclusions and Exceptions
This document does not cover using IBM Cognos Report Studio or IBM Cognos Framew
orkManager (FM) or IBM Cognos BI performance tuning.
Assumptions
This document assumes readers have experience with IBM Cognos BI - in particular
IBM CognosReport Studio and IBM Cognos Framework Manager.
Overview
In a SaaS (Software as a Service) application report migration project, the auth
ors successfullymigrated over 40 SAP Business Objects reports to IBM Cognos BI w
ithin 6 months andsummarized the best practice of migrating BO reports to Cognos
when there are no BO Universefiles that can be leveraged. Considerations about
security, performance tuning and globalizationof reports are mentioned in this d
ocument. In the last sections of this document, issues andlimitations encountere
d along the way and corresponding solutions will be discussed.
Background
The project the authors worked on is a SaaS (Software as a Service) application
where reportingserves multiple client organizations known as tenants. The BO rep
orts are built on top of adatabase called Operational Data Store (ODS) in the pr
oject, which is replicated from a productionOnline Transaction Processing (OLTP)
database every evening.
As shown in Figure 1, the high level architecture has three tiers in this soluti
on - the DataTier, Business Tier and Client Tier. In the Data Tier, ODS is used
as the data source. In theBusiness Tier, the Business View Manager Component of
Business Objects is used to build DataConnection, Data Foundation, Business Elem
ents and Business Views. In the Client Tier, theCrystal Reports component of Bus
iness Objects is used to design the reports.
ibm.com/developerWorks/
developerWorks
IBM Business Analytics Proven Practices: Case Study - MigratingBO Reports to IBM
Cognos BI without Universe FilesPage 3 of 16
Figure 1: High level architecture of the Business Objects solution
In order to efficiently migrate BO reports to Cognos BI, a star schema or snow-f
lake schemais not used in this project. Instead Cognos query subjects are built
directly on top of ODS datasource. Although building Cognos reports on top of a
star schema is the best practice, withproject constraints, the approach describe
d in this document is the fastest way with the lowestrisk. So thats why this appr
oach is used for short-term migration. Figure 2 shows the high levelarchitecture
for the new Cognos solution.
developerWorks
ibm.com/developerWorks/
IBM Business Analytics Proven Practices: Case Study - MigratingBO Reports to IBM
Cognos BI without Universe FilesPage 4 of 16
Figure 2: High level architecture of the IBM Cognos BI solution
There are also three tiers - the Data Tier, Business Tier and Client Tier. The D
ata Tier is exactly thesame with BO one. For the Business Tier, we use IBM Cogno
s Framework Manager to build QuerySubjects as the model of the reports. One Quer
y Subject contains one or more Query Items. Oneor more Query Subjects can compos
e a package and the package can be published to the Cognosserver so the Client T
ier can use Cognos Report Studio to design and build the reports.
Steps of Migrating a BO Report to Cognos
The best practice of efficiently migrating Business Objects reports to IBM Cogno
s BI without theUniverse file is summarized below and graphically represented in
Figure 3. There are four mainsteps and two optional steps. The optional steps c
reate outputs that are fed into one of the mainsteps. As shown in Figure 3, Opti
onal step 1 feeds into main Step 2 and Optional step 2 feeds intomain Step 4.
ibm.com/developerWorks/
developerWorks
IBM Business Analytics Proven Practices: Case Study - MigratingBO Reports to IBM
Cognos BI without Universe FilesPage 5 of 16
Figure 3: Flowchart of steps to migrate a BO report to IBM Cognos BI
The detailed description of each step listed as below.
Optional step 1: Export Business View in Business View Manager
Every BO report is built on top of a Business View. A Business View is a logical
collection ofBusiness Elements. Users see Business Views as abstract database o
f connections and thecontained Business Elements as virtual tables that contain
Business Fields.
A Business View file can be exported from BO and used in Step 2 in Figure 3. The
Nameelement of the Business Element field in the Business View file can be used a
s the sub-queryalias.
To find which Business View a report uses, in the Crystal Reports client use the
Database Expertby selecting Database > Database Expert from the menu bar. The B
usiness View name is in theright pane as shown in Figure 4.
developerWorks
ibm.com/developerWorks/
IBM Business Analytics Proven Practices: Case Study - MigratingBO Reports to IBM
Cognos BI without Universe FilesPage 6 of 16
Figure 4: Database Expert showing the Business View name
Once the Business View name is found, open Business View Manager, select Tools >
Export,select the Business View and export it as an XML file.
Optional step 2: Export Business Objects report definition file
The Business Objects report definition file contains the report layout, data fie
lds, filters andformulas. A Cognos report can be re-created using this definitio
n file as reference. A BO reportdefinition can be exported to a text file using
the Crystal Reports client.
Open BO report file (with a RPT extension) in Crystal Reports. From the menu bar
, select File >Export > Export Report (see Figure 5), a dialog opens, select the
format Report Definition (TXT)and destination Disk file, then export, the report de
finition file will be saved.
ibm.com/developerWorks/
developerWorks
IBM Business Analytics Proven Practices: Case Study - MigratingBO Reports to IBM
Cognos BI without Universe FilesPage 7 of 16
Figure 5: Using Crystal Reports to export the Business Objects reportdefinition
file
Step 1: Generate Report SQL in Crystal Reports
BO report SQL can be generated in Crystal Reports client by the following steps.

From the menu bar, select Database > Show SQL Query

Input the parameter values in the prompt page if there is any

Click OK to get the SQL


Step 2: Modify the Generated SQL
Now that we have the SQL, there are a few modifications that need to be made in
order to use theSQL in a Cognos Query Subject.

The BO SQL contains lots of sub-queries which dont have an alias. Since Cognos wi
ll reporterrors when creating a Query Subject using SQL that doesnt have aliases
for sub-queries,aliases need to be added for every sub-query in the SQL. Its bett
er to have a meaningfulalias for the sub-query and the BO Business Element field
name can be used as the alias.The field name can be found in Business View file
. For example, a sub-query in the SQLwould be similar to the following,
where bad.bol_id = ORDERS.BOL_IDand bad.area_id = ORDERS.DEST_AREA_IDSearch this sub-q
ry in the Business View file. The sub-query will be in the node <Field>/<Formula
FieldInfo>/<Text>. The value of node <Field>/<FormulaFieldInfo>/<Name> can beuse
d as the alias.
<Field xsi:type=CrystalEnterprise.MetaData.BusinessFormulaField id=3710> <CUID>ATrLb
00O2DBLtploDCUeZHA</CUID> <ObjectPrincipals xsi:type=CrystalReports.PropertyBag id
=3711 content-id=9 /> <FormulaFieldInfo xsi:type=CrystalReports.FormulaField id=3712 v
sion=2> <Name>ORD DEST NEEDED BY DATE</Name> <Description>Order destination needed
by start date</Description> <Type>xsd:dateTime</Type>
developerWorks
ibm.com/developerWorks/
IBM Business Analytics Proven Practices: Case Study - MigratingBO Reports to IBM
Cognos BI without Universe FilesPage 8 of 16
<Length>12</Length> <HeadingText /> <Attributes xsi:type=CrystalReports.PropertyB
ag id=3713 content-id=78 /> <Syntax>SQL</Syntax> <Text>(select bad.NEEDED_BY_START fr
om bol_area_dates bad where bad.bol_id = ORDERS.BOL_ID and bad.area_id = ORDERS.DEST_AR
EA_ID)</Text> <FormulaNullTreatment>Exception</FormulaNullTreatment> </FormulaFie
ldInfo> <SQLExpressionConnectionInfo xsi:type=CrystalEnterprise.MetaData.DataConn
ection id=79 content-id=79 /></Field>

The WHERE clause also needs to be modified in the BO generated SQL. The conditio
ns inthe WHERE clause were generated by the inputs when developer generated the
SQL. Theconditions should be replaced by Cognos prompts so the report user can d
ynamically filterthe report output using the prompts. For example, there is a re
port showing the maintenancecosts for a machine in a specific date range. The re
port user can choose the date range froma date control. When generating report S
QL in BO Crystal Clients, the date range needs to beprovided. For example, if th
e date range provided is from May 1, 2012 to May 1, 2013, SQLsimilar to the foll
owing will be generated,
SELECT ***FROM ***WHERE *** MAINTENANCE.MAINTENANCE_DATE >= TO_DATE(2012-05-01,YYYY
-MM-DD)AND MAINTENANCE.MAINTENANCE_DATE <= TO_DATE(2013-05-01,YYYY-MM-DD)The fixed da
te range in the SQL WHERE clause should be specified in Cognos BI similar tothe
following,
SELECT ***FROM ***WHERE *** MAINTENANCE.MAINTENANCE_DATE >= TO_DATE(#sq(prompt(Fr
om Date,date, timestampMask($current_timestamp,yyyy-mm-dd)))#,YYYY-MM-DD)AND MAINTENANC
E.MAINTENANCE_DATE <= TO_DATE(#sq(prompt(To Date,'date', timestampMask($current_ti
mestamp,'yyyy-mm-dd')))#,'YYYY-MM-DD')The reason filters are put directly into t
he SQL is to improve report performance. Performancewill be touched on later in
the section titled Performance Tuning.If there are a large number of reports, it
is possible to automate adding the alias and filters,saving the effort of havin
g to manually copy the Cognos prompts to the SQL.For adding the alias, the autom
ation program would need to:
1.
Read the SQL generated by Crystal Reports client and the corresponding Business
Viewfile.
2.
Parse the sub-queries in SQL select clause.
3.
For each sub-query, search it in the Business View file.
4.
Get the value of node <Field>/<FormulaFieldInfo>/<Name> when finding matched nod
ein the Business View file.
5.
Use the Name value as the alias for the SQL sub-query.
6.
Add the alias for all the sub-queries in the SQL and generate a new SQL file.
ibm.com/developerWorks/
developerWorks
IBM Business Analytics Proven Practices: Case Study - MigratingBO Reports to IBM
Cognos BI without Universe FilesPage 9 of 16
For adding filters, the report developer would need to create a project-specific
template fileand a parameter file containing the filters to be added to the rep
ort. For example, the filterexample above would have a template file that contai
ns the following,
01234567890123456789012345678901234567890123456789012345678901234567890123456789
0123456789DateRange $DateRange$ >= TO_DATE(#sq(prompt(From Date,date, timestampMask(
$current_timestamp,yyyy-mm-dd)))#,YYYY-MM-DD) AND $DateRange$ <= TO_DATE(#sq(prompt(T
o Date,'date', timestampMask($current_timestamp,'yyyy-mm-dd')))#,'YYYY-MM-DD')The
first field in the template file (DateRange) is a tag that defines an entry and
this entry willbe referred to by the parameter file. The second field contains
the SQL to be substituted. TheSQL contains substitution variables that will be r
esolved using the parameter file.The parameter file might look something like,
DateRange MAINTENANCE.MAINTENANCE_DATEThe first field (DateRange) represents an
entry in the template file and the second field(MAINTENANCE.MAINTENANCE_DATE) re
presents the actual SQL condition field to beused to replace the substitution va
riable ($DateRange$) in the SQL in the template file.The automation program woul
d perform the following tasks,
1.
Read the SQL file, the template file and the parameter file.
2.
Parse the conditions in the SQL WHERE clause.
3.
For the condition field (MAINTENANCE.MAINTENANCE_DATE) which matches the paramet
er fileentry, get the entry name from the template file (DateRange).
4.
Find the filter template in the template file according to the entry name. In th
is example,the template entry name DateRange maps to the filter
$DateRange$ >= TO_DATE(#sq(prompt(From Date,date,timestampMask($current_timestamp, yy
yy-mm-dd)))#,YYYY-MM-DD) AND $DateRange$ <= TO_DATE(#sq(prompt(To Date, 'date',timest
ampMask($current_timestamp,'yyyy-mm-dd')))#,'YYYY-MM-DD')
5.
Generate the filter by replacing the variable in the filter template with the co
ndition field.In this instance replace $DateRange$ with MAINTENANCE.MAINTENANCE_
DATE.There would normally be only one template file that can be used for all of
the reports and oneparameter file for each report.
Step 3: Create a Cognos Query Subject
With the modified SQL, a Cognos Query Subject can now be created in IBM Cognos F
rameworkManager. The following points need to be followed when creating our Quer
y Subject.

The first step the New Query Subject wizard is the Name and Type step. Select Da
taSource (Tables and Columns) instead of the default option of Model (Query Subj
ects andQuery Items). This is shown in Figure 6.
developerWorks
ibm.com/developerWorks/
IBM Business Analytics Proven Practices: Case Study - MigratingBO Reports to IBM
Cognos BI without Universe FilesPage 10 of 16
Figure 6: Select Name and Type from the New Query Subject wizard inCognos Framew
ork Manager

In the Select Data Source step of the wizard, select the data source and unselec
t the Rundatabase query subject wizard option.

In New Query Subject step, copy the modified SQL to the right side editor. Switc
h to the Testtab and click Options. In the pop up dialog, switch to the SQL sett
ings tab and select Nativeas the SQL type.
Step 4: Create an IBM Cognos Report
Create the Cognos report using the Business Objects report as a reference. For e
xample, if BOreport is a list report, then create a list report in Cognos. If th
e BO report is a crosstab report, thencreate a Cognos crosstab report.
Most of the reports in this project have prompt pages for users to filter the re
port output andalso have the report footer information shows what parameters the
user selected. It is possibleto automate generating a blank report with a promp
t page and report footer by creating an IBMCognos SDK program. The program would
extract all the prompt page and footer sections fromthe reports that the report
developers have already developed and place them into a templatereport. When a
new report needs to be developed, the Cognos SDK program would extract allthe pa
rameters in this new report and if the parameter can be found in the template re
port, theprogram will copy the corresponding section from the template report to
the new report. If theparameter cannot be found in the report template, the pro
gram would alert the report developer toimplement it manually.
Theoretically, for simple reports, the report page can also be generated automat
ically with the BOreport definition file. But because BO report definition file
doesnt have the mapping informationbetween column headers and data fields, column
headers need to be changed after the reportpage generated. While it is a proces
s that can be automated, its something that is normally donemanually.
ibm.com/developerWorks/
developerWorks
IBM Business Analytics Proven Practices: Case Study - MigratingBO Reports to IBM
Cognos BI without Universe FilesPage 11 of 16
Security
In a SaaS application, all the tenants use one application. Since data is stored
on the vendorsserver, security becomes an issue. To prevent the data and IBM Cog
nos BIobjects from beingaccessed incorrectly across different tenants, the autho
rs decided on the following for this project.
Data security
For the data security, session parameters in Framework Manager are used to contr
ol the dataaccording to the user role, user organization or user ID. The SQL wit
h session parameters lookssomething like this,
SELECT ***FROM ORDERS ORDERSWHERE ORDERS.ORG_ID = #$account.parameters.OrgAccoun
tId#
IBM Cognos BI object security
IBM Cognos BI objects such as Folders, Reports and Report Outputs should have di
fferentpermissions for different organizations, users and roles. For example, fi
nancial reports should notbe visible for general report users and report outputs
should not be accessed by the report users inother organization.
Folders and reports can be secured directly in IBM Cognos Administration by allo
wing or denyingusers access to the object or even keeping the object hidden from
all the users.
For the report outputs in Business Objects, a user can only see their run histor
y of the report.In IBM Cognos BI, if a report is accessible to all the users in
the Public Folders area, one usercan view the report output run by other users.
This is not acceptable for users in a SaaS offeringapplication. The solution is
revoking read and write permissions on the report so that a user cannotview hist
ory anymore. If the user really needs the run history, they can create a Report
View of thereport and then save the report output.
A similar issue exists in scheduling a report. One user can see other users sched
ule and can evenremove it if the Administrator doesnt revoke the read and write p
ermissions on the report. Onceagain, the solution is to create a Report View and
then create a schedule on that Report View.
Performance Tuning
The SQL generated by BO reports can be tuned to get better performance. SQL perf
ormancetuning will not be discussed here as it is a general topic that is covere
d in depth by databasevendor documentation as well as many other documents that
can be found in an internet search.
IBM Cognos BI performance can also be improved by changing settings such as cach
ingquery results. For more information on tuning IBM Cognos BI servers, refer to
the chapter titledPerformance Monitoring and Tuning in the IBM Cognos Business
Intelligence Architecture andDeployment Guide.
For this project, the authors determined it was best to add filters to the Query
Subject instead ofadding them to each report (see main Step 2 in Figure 3). Thi
s is because the authors did some
developerWorks
ibm.com/developerWorks/
IBM Business Analytics Proven Practices: Case Study - MigratingBO Reports to IBM
Cognos BI without Universe FilesPage 12 of 16
performance tuning in the SQL FROM clause to reduce the data before joining to o
ther tables.In this case, if filters were added to the report in Report Studio,
there will be a two-stage queryprocess. One is retrieving the large data set fro
m database; the other is filtering the large data setby parameters. But if the f
ilters were added to the query subject in FM, it will be a single query withcond
itions in WHERE clause and the performance will be much better.
Globalization
A SaaS based application reporting requires the support of globalization. One st
andard report canbe used by users in different countries. IBM Cognos BI supports
multilingual reporting; however,the globalization of the FM model and reports m
eans changing the model source file (model.xml)and report source file (report sp
ecification XML) whenever a new language is added. A regressiontest should be ru
n whenever the model or report specifications are changed.
For information on creating a multilingual reporting environment in IBM Cognos B
I, refer to thechapter titled Setting up a Multilingual Reporting Environment in
the IBM Cognos FrameworkManager User Guide.
It is possible to automate the report globalization task. The automation program
would need toread the model XML file and all the XML report specifications and
extract the static text valuesfrom these files to an English language resource f
ile. This resource file can be provided to atranslation service. After the trans
lation is done, the automation program can read the translatedfiles and add the
multilingual content to the model XML and the XML report specifications.
Issues and Limitations
This section will briefly introduce the issues the authors encountered and some
of the solutionsfound.
Internet Explorer support for Excel report output
The authors encountered some issues when using Internet Explorer (IE). For examp
le, with IE8 in Cognos 10.1.x or 10.2.x, if a report is run from IBM Cognos Conn
ection with a report outputformat of Excel 2007 and the delivery option of View
the report now, there is no prompt that letsthe user choose to open or save the
file. This issue was resolved by setting up security in IE as perthe document at
the following URL,http://cafe.northwestern.edu/documents/training/cognosreporti
ng/111/SetSecurityExcel.pdf
FTP support in IBM Cognos BI
BO supports FTP as delivery method for report outputs. A user can select a speci
fic FTP server ora default FTP server (see Figure 7).
ibm.com/developerWorks/
developerWorks
IBM Business Analytics Proven Practices: Case Study - MigratingBO Reports to IBM
Cognos BI without Universe FilesPage 13 of 16
Figure 7: Business Objects report delivery methods
IBM Cognos BI does not provide built-in support for delivering report output via
FTP. Figure 8shows the IBM Cognos BI delivery options which include View the re
port now, Save the report,Print the report and Send me the report by email.
Figure 8: IBM Cognos BI report delivery methods
It is possible to develop a solution that lets users get report output from a FT
P site. First, aseparate folder for every customer needs to be created in the FT
P server. Then a shell scriptwhich will run on the IBM Cognos BI server will nee
d to be created. The shell script will look forreport outputs that get created w
hen the Save report outputs to disk option is enabled in theCognos BI environmen
t, read the XML file that contains the information about who ran the reportand F
TP that report output to the proper folder where the user can be accessed it lat
er via FTP.
Order of parameters in the IBM Cognos report confirmation page
When running an IBM Cognos BI report, a confirmation page may be is presented an
d on thispage the list of parameters and their values appear in an order that do
es not always matchthe order they appear in the report. For example, as shown in
Figure 9 a report has severalparameters in its prompt page and the order of the
parameters is as follows,
1.
Date Choice
2.
From Date
3.
From Date Offset
4.
To Date
5.
To Date Offset
6.
Origin City
developerWorks
ibm.com/developerWorks/
IBM Business Analytics Proven Practices: Case Study - MigratingBO Reports to IBM
Cognos BI without Universe FilesPage 14 of 16
7.
Destination City
8.
Carrier Name or SCAC choice and value
9.
Movement Type
10.
Vouchered Status
11.
Payee Name
Figure 9: Parameter Orders in Prompt Page
But when the user selects to save this report when running it, the confirmation
page shown inFigure 10 presents with the parameters being listed in the followin
g order,
1.
Payee
2.
Vouchered Status
3.
Movement Type
4.
Destination City
5.
To Date
6.
From Date
7.
To Date Offset
8.
Carrier Name or SCAC
9.
Origin City
10.
Date Choice
11.
From Date Offset
ibm.com/developerWorks/
developerWorks
IBM Business Analytics Proven Practices: Case Study - MigratingBO Reports to IBM
Cognos BI without Universe FilesPage 15 of 16
Figure 10: Parameter Orders in Running Confirmation Page
At the time of this writing, there is no way to customize this however IBM Cogno
s Support hascreated an APAR for this issue at the following URL,http://www.ibm.
com/support/docview.wss?uid=swg1PM81196
developerWorks
ibm.com/developerWorks/
IBM Business Analytics Proven Practices: Case Study - MigratingBO Reports to IBM
Cognos BI without Universe FilesPage 16 of 16
About the authors
Yan Fang Ji
Yan Fang Ji has worked for nearly 2 years in the area of Cognos reporting. Prior
to that she worked on IBM SPSS products such as Collaboration and DeploymentServ
ice. She is now working on the IBM Sterling Control Center product. Shegraduated
from Northwest University in Xi'an, China.
Lian Li
Lian Li was an architect of the IBM Transportation Management System and laterma
naged File Transfer products. He is experienced in designing and implementingent
erprise application using Java technology.
Yang Zhang
Yang Zhang is a software engineer on the IBM Sterling TMS team. His main focus i
shelping the TMS team migrate Business Objects reports to Cognos. He joined IBM
4years ago after graduating from Shanghai Jiao Tong University.
Copyright IBM Corporation 2013
(www.ibm.com/legal/copytrade.shtml)
Trademarks
(www.ibm.com/developerworks/ibm/trademarks/)

You might also like