Cognos BI Best Practices

Download as pdf or txt
Download as pdf or txt
You are on page 1of 19

COGNOS BI - Best Practices

1 of 19
COGNOS – Best Programming Practices

1.0 Introduction

 Cognos 8 is a web-based enterprise reporting solution to meet all the


reporting requirements such as ad-hoc analysis, managed reports,
business reports, MOLAP analysis, dashboards and scorecards.
 Cognos 8 enables the complete user coverage with an intuitive browser-
based user interface which enhances user adoption and improves their
productivity.
 This document is primarily intended for Designers, Application
Developers and Report developers using Cognos 8.
 It is sincerely hoped that as Cognos becomes increasingly complex and
the tips and tricks one picks up through one’s own experience will be
shared.

2.0 Purpose

This document aims to

 Develop and use best practices and information related to architecting


the Reporting environment
 Provide guidelines to the development team as a central source of
information.
 Applies best to versions from 8.0 to 8.2. New features in versions above
8.2 not included.

3.0 Target Audience

This document is written for professional Cognos developers to help them:

 Develop Cognos Reports that are easy to maintain and enhance


 Increase their productivity

4.0 Different tools of Cognos 8 BI

 Cognos Configuration

 Framework Manager

 Cognos Connection

 Query Studio

 Report Studio

2 of 19
COGNOS – Best Programming Practices

 Analysis Studio

5.0 Organization of this document

The following sections are organized in this document

Section 6 Cognos Configuration

Section 7 Framework Manager

Section 8 Cognos Connection

Section 9 Query Studio

Section10 Report Studio

6.0 Cognos Configuration

6.1 Configuration Best Practices

 The default installation configures Cognos 8 gateway server to use CGI gateway.
But CGI gateway delivers the slowest performance. Performance can be
improved by configuring Cognos to use gateways like: ISAPI – delivers fastest
performance when used with Microsoft IIS Webserver, Apache_mod – this
gateway can be used with Apache web severs or IBM HTTP servers, Servlet – to
use servlet gateway if the webserver infrastructure supports servlets.

 Always have the Cognos Directory Administration to be available to a user who is


not part of the namespace where all the development users are getting
authenticated. In addition, add the Cognos administrator user group to itself in
addition to the individual users.

 While creating the Database take care of the Collation sequence to be Case
Insensitive.
 Create an installation and configuration with the following Servers.
o Server 1 having the Web Server and the Gateway components
o Server 2 Application server (also called Dispatcher server)
o Server 3 Content Manager
o Server 4 Content Store

The number of Gateway servers and Dispatcher servers can be increased based
on the number of users; a large number of simultaneous users require more than
one gateway and dispatcher server to handle the load.

 The content manager is imperative if many users are expected to use the Cognos
servers in a given timeframe.

3 of 19
COGNOS – Best Programming Practices

 Configure one of the dispatcher servers or a separate server as the backup


content manager and configure Cognos server administration properties to
enable the backup content manager to take over automatically when the active
content manager fails or is stopped.

 Configure the email option and test for emailing if required. Use the notification
option in the Configuration> Data Access.

 While configuring Audit reports and Audit database, set audit level to report for a
balanced performance. Setting the audit level to a level below this will result in
very less data capture in the Audit database. Setting the level higher than the
third will result in a decrease in performance due to frequent data entry in the
audit database.

 For backup and disaster management, a backup of the content store on a regular
basis will ensure minimal loss of reports and data in the case of a content store
crash.

7.0 Framework Manager

Framework Manager runs in Microsoft Windows and provides GUI for metadata
modeling and package creation. It provides users with options to import metadata
from one or more data sources/excel files/MOLAP cubes etc and transform it into a
business-oriented model that can be used to create reports and for Ad-hoc analysis.

When you work in Framework Manager, you work in a Project. A project contains
namespaces, query subjects, folders, and packages.

A model in Framework Manager is a business presentation of the structure of the


data from one or more databases. A model describes the data objects, structure,
and grouping as well as relationships and security.

After you define a Framework Manager Project along with model you can publish
the package containing the metadata information to the Content manager server
for use by authors and query users.

After a package is published to the Cognos server, report authors can use the model
to create dashboards, reports and ad-hoc queries.

7.1 Project Structure Best Practices

The basic structure we recommend is a 3-layer model with data source and stored
procedure query subjects with relationships defined providing a physical query layer;
model based query subjects, shortcuts of other data source query subjects and
stored procedure query subjects, complex calculations forming the staging layer and
rearranged business level query subjects providing the presentation layer.

4 of 19
COGNOS – Best Programming Practices

The 3--layer model works well for both report authors and data modelers. The
presentation layer makes it easier for report authors to find and understand their
data, while the physical layer acts as the foundation for the presentation layer.

In the absence of complex model based query subjects and calculations, a 2-layer
model is recommended.

Where appropriate, create calculations, filters, and other modifications in the


physical layer or staging layer to maximize reuse in the presentation layer.

The presentation layer is made up of shortcuts, calculations, and filters organized


into folders. Both folders and query subjects appear as folders to the report author.

This organization of information into relevant business categories simplifies the user
reporting experience as users can locate the information they require more easily.
Query items have had default data formatting specified.

Underlying this presentation layer is a series of data source query subjects that,
while not visible to the report author, define the very essence of the model
including:

 Basic data access – SQL queries define the views into the query database

 Calculations – so that each user does not have to perform the same basic
business Calculations in each report or query

 Multilingual data access – the sample databases are in 26 languages. Each user
sees only the data for the language they request. ReportNet is able to do this
automatically based on the fashion in which the SQL queries are modified at run
time according to the rules laid out by the Framework Manager modeler.

 Heterogeneous database access – this model is built atop two databases

7.2 Naming Conventions for Objects in a Project

All objects in a project have an identifier that is used to reference them. The
identifier can consist of one, two, or three parts, depending upon the type of object.
The parts include

 an object name, and

 a location in the project hierarchy, as expressed in the default language of the


project.

If you want to have objects with the same name in a project, these objects need a
unique identifier. To create a unique identifier for an object, you must create a
namespace.

5 of 19
COGNOS – Best Programming Practices

7.2.1 One-part Identifiers

Some objects in a project have a one-part identifier. The one-part identifier must be
unique across the entire project, even if the namespace contains other namespaces.
These are the objects that have a one-part identifier:

 Namespaces

 Functions

 Shortcuts to namespaces

 Shortcuts to folders

7.2.2 Two-part Identifiers

Most of the objects in a Framework Manager project have a two-part identifier. The
two-part identifier consists of the name of the containing namespace and the name
of the object. The object name must be unique in the nearest containing namespace.

For example, you have a Sonata namespace that contains a query subject named
Verticals. The Verticals query subject has the following name, where the square
brackets and periods are the syntax Framework Manager uses for object identifiers.

[Sonata]. [Verticals]

7.2.3 Three-part Identifiers

Some objects in a project have a three-part identifier. The three-part identifier is


based on the identifier of the containing query subject. Each name must be unique
in the containing query subject. Do not create copies of the Query Items as these
will lead create problems in maintaining Data level security. These are the objects
that have a three-part identifier:

 Query items

 Query item folders

For example, you have a Sonata namespace that contains a query subject named
Verticals, and a query item named Finance. The Finance query item has the following
name, where the square brackets and periods are the syntax Framework Manager
uses for object identifiers.

[Sonata]. [Verticals]. [Finance]

7.3 Best Practices for Preparing Metadata For Use in Reports

When you are preparing metadata for use in a reporting application, you must
identify the relationships and aggregations that are necessary to generate efficient
queries that deliver the required results.

6 of 19
COGNOS – Best Programming Practices

Before report authors can create reports, you must follow a process in Framework
Manager:

 Ensure that you know your data and the structure of your data source(s).

 Analyze and understand your reporting requirements before you begin.

 Create a new Framework Manager project.

 Import the required metadata as data source query subjects.

 You should import only the smallest number of tables and relationships that
you need in your project.

 Validate the model objects that were created. In particular:

o Resolve ambiguous relationships by ensuring that there are no


redundant relationships that can result in incorrect results, and that
the correct relationship path is used.

o Resolve loops by creating necessary Aliases or shortcuts.

o Verify the Usage and Regular Aggregate property values of each


query item, especially if the usage is set to "fact".

 Use shortcuts in your model, instead of copies. Shortcuts make it easier to


maintain metadata in the physical layer. When you use shortcuts, consider
where you use them and what the impact is on relationships:

o Shortcuts in a different folder from the target query subject ignore


the relationships of the target query subject and use the
relationships specified for that shortcut.

o Shortcuts in the same folder as the target query subject use the
relationships of the target query subject.

 Use star schema groups to isolate fact tables that share conformed
dimension(s). By using shortcuts to separate fact tables into different
folders, you can resolve any ambiguous relationships.

 Enhance the data source query subjects or stored procedure subjects as


required, and create model query subjects. When you do this, consider the
following:

o It is helpful to create a folder that contains the model query subjects.


This folder acts as a presentation layer that lets you organize model
objects so that you can distinguish them from the data source
objects.

o It is best practice to create relationships only in the data-source

7 of 19
COGNOS – Best Programming Practices

layer.

o Where ever possible, use shortcuts rather than copies. This helps
you maintain the objects by ensuring that changes to the target
object are reflected in the shortcut.

o Plan your filters carefully so that you can reuse them with multiple
query subjects.

 Specify dimensional information. By grouping objects that are based on


dimensions, Framework Manager can manage parallel-detail (two one-to-
many) relationships properly to avoid double counting. You should define
dimensional information in the presentation layer.

 Minimize the use of hardcoded hand typed SQL. The use of hardcoded SQL
instead of importing tables form the database makes maintenance and
enhancements difficult. Any change in the database table structure will
necessitate analysis, change and testing of every hard-coded SQL. Instead of
this, if objects are imported from the database, changes in table structure
can be verified in the first layer only with minimal effort.

 Avoid outer joins and cross joins to avoid performance problems.

 Avoid fact to fact joins by creating separate star schema groupings. Fact to
Fact joins lead to bad performance of reports.

8.0 Cognos Connection

Cognos Connection is the Web portal for Cognos 8 BI. Use the portal to store and
access your reports. If you have the necessary permissions, you can also use the
portal for report administration, including scheduling and distributing reports;
server administration and content administration. Administrators use the portal to
administer servers, optimize performance, and set access permissions.

Setting access permissions for an entry includes creating new permissions, or


updating existing permissions. You can specify access permissions for all entries in
Cognos connection. Some examples of such entries are reports, packages,
shortcuts, report views, namespaces, groups, users, or dispatchers. You can
reference entries from different namespaces. If you plan to set permissions that
reference multiple namespaces, you must log on to each of those namespaces
before you start your task. Otherwise, you will not have full administrative rights for
the entries you want to modify.

8.1 Recommended steps to Set Access Permissions for an Entry

1. In the portal, locate the entry for which you want to set access permissions.

2. In the Actions column, click the Set properties button for the entry.

8 of 19
COGNOS – Best Programming Practices

3. In the Set properties page, click the Permissions tab.

4. Choose whether to use the permissions of the parent entry or specify different
permissions (For easier maintenance, it is recommended that security be set in the
parent level where ever possible):

 To use the permissions of the parent entry, clear the Override the access
Permissions acquired from the parent entry check box, and then proceed to
step 11.

 To set access permissions explicitly for the entry, select the Override the
access Permissions acquired from the parent entry check box, and then
perform the remaining steps.

5. If you want to remove an entry from the list, select its check box and click
Remove.

6. If you want to select or deselect all entries in a page, click Select all or Deselect all
at the bottom of the list.

7. To specify the entries for which you want to grant or deny access to this entry,
click Add and then choose a method:

 To add entries by selecting the names from the list, on the Navigate tab,
click the appropriate namespace, and then select the check boxes next to
the users, groups, or roles, and click Add. When the entries appear in the
Entries to be added box, click OK.

 To search for users, groups, or roles in a namespace you are currently using,
on the Search tab, type the text in the Search string box. If needed, specify
additional search criteria, and click Search. When the entry appears in the
Search results box, click Add, and then, when the entry appears in the
Entries to be added box, click OK.

 To add entries by typing the names, on the Type tab, in the Type the names
box, type the names of namespaces, groups, roles, or users in the following
format, and then click Add:

namespace_name;namespace_name/group_name;namespace_name/role_name;

namespace_name/user_name;

Here is an example: LDAP;Cognos/Authors;LDAP/scarter;

Separate each entry using a semicolon (;).

When the entries appear in the Entries to be added box, click OK.

The entries you added appear in the list.

9 of 19
COGNOS – Best Programming Practices

8. For each entry in the list, in the box next to the list, select or clear check boxes to
specify what type of access you want to grant or deny. To remove access to a user,
role or user group, remove the user, role or user group from the security list of
that object instead of checking the “deny” box. This is recommended because deny
always takes precedence than grant and hence use of deny option makes
maintenance difficult.

9. Click Apply.

In the Permissions column, an icon appears next to the user, group, or role. This icon

represents the type of access granted or denied to the entry.

10. If you want to replace the existing permissions of the child entries with the
permissions you set for this entry, in the Option section, select the Delete the access
permissions of all child entries check box.

This option appears only with the entries that are containers.

8.2 Configurations

8.2.1 Drivers

 Check for the Drivers for the Data Sources. Use Native drivers where possible
instead of ODBC drivers. Use Cognos Connection> Directory> Data Sources to
add the Data Sources. This would be required for the Reporting Databases.
Ensure owner of the Data source.

 The highest level of data level security is set at the Data Source level. By applying
security at the Data Sources, we can restrict access of Data Sources. But this
level of security is recommended only for highly secure environments and not
for normal environments.

8.2.2 User Groups and Roles

 Roles are required for very large User Groups. For small number of users User
Group creation would be enough.

 If a third party authentication or Cognos series 7 namespace is used, security is


set using the Tools -> Directory -> Users, Groups and Roles tab. Users and user
groups are imported from the Cognos series 7 or thir party authentication
sources in to the corresponding folders by default. From here, users and user
groups can be copied into the Cognos 8 folder and arranged in various different
roles and groups as per business needs (Sales users, Sales Report Authors, Sales
Adhoc Users etc).

 Create User Groups based on the type of Business User e.g., Finance, Sales etc.,
This can be used to implement the data level filters. This way data of one group
may be available only to one user group.

10 of 19
COGNOS – Best Programming Practices

 Once the authentication provider is configured take backup of the content


store. Use Cognos Connection> Directory> User Groups and Roles.

 Cognos connection is also used to schedule running and bursting of reports and
jobs. If a user account is used for this, the schedule is active as long as the user is
active. In the event of deletion of the user’s account, the schedules associated
with that user id are deactivated by default. To avoid this, the use of a service
Cognos account is recommended to set up schedules and jobs.

8.2.3 Distribution lists and contacts

 Create a distribution list based on the Report Names or the type of users groups
so that maintenance and usability is proper. Use Cognos Connection> Directory>
Distribution lists and contacts. The UserName and email address can be
configured here.

8.2.4 Printer

 Configure the printers with proper names and access permissions. Use Cognos
Connection> Directory> Printers

9.0 Query Studio

Query Studio is the ROLAP ad hoc reporting tool for Cognos 8, the Web-based
reporting solution. In Query Studio, you can

• View data

Connect to an existing package to view data in a tree hierarchy. Expand the query
subjects to see query item details.

• Create reports

Use the data source to create reports, which you can save and reuse. You can also
use an existing report to create a new report.

• Change the appearance of reports

Improve the layout of your report. For example, you can create a chart, add a title,
or reorder columns for easy comparison.

• Work with data in a report

Use filters, summaries, and calculations to compare and analyze data.

11 of 19
COGNOS – Best Programming Practices

9.1 Reports and Package Versions

In Query Studio, reports always use the most recent version of the package. If the
package is republished, you are notified that the report will use the newest version of
the package. You must save the report to complete the update.

In Report Viewer, if you open a saved report after the package it is based on is
republished, one of two things happens:

• If the original version of the package still exists, the report runs against the
original version.

• If the original version of the package no longer exists, the report is updated to
run against the most recent version.

9.2 Steps to Run Reports

Run with Prompts


In Query Studio, prompts ask for user input to define the content of a report. If a
report contains prompts, you are prompted when you open the report and
when you run the report.

Run with All Data


The Run With All Data command runs the report using the full data source.
Running a report can take a long time. If you plan to make several changes to a
report, run the report in preview mode to save time and computer resources by
limiting the rows of data that your report retrieves.

Preview Reports with Limited Data


By limiting data retrieval, you can run reports more quickly.

Preview mode improves the report performance only if the data modeler
defines one or more design mode filters in the Framework Manager project.
Design mode filters restrict the amount of data that a preview report retrieves
to a predetermined limit.

When you use this command, remember that the data retrieved in preview
mode is not complete. The accuracy of the data returned is limited to the
number of preview rows predefined in the model. For example, summarized
values will be incorrect because they do not include all of the data.

When a preview uses limited data, a torn border appears at the top and bottom
of your report as a visual reminder that you are not using the entire data source.

Preview Reports with No Data


When a preview uses no data, a torn border appears at the top and bottom of

12 of 19
COGNOS – Best Programming Practices

your report as a visual reminder that you are not using the entire data source.

When you preview reports with no data, you do not use the data source at all.
Artificial data replaces the numbers and characters from the data source. None
of the data is correct.

9.3 Use Filters

9.3.1 Filtering Based On Report Details.

When you filter on details, you filter the values that appear in the detail rows of
your report. A filter or combination of filters can be created in Query Studio
reports. These filters can be set to prompt for values every time the report is
run.

9.3.2 Filtering Based On Group Summaries

When you filter on summaries, you filter the values in the footers. Filtering on
summaries eliminates groups from your report.

9.4 Create Custom Groups

Create custom groups to produce a new report item containing values that are
meaningful to you. Use custom groups to

• convert a list of numeric results into broader categories. For example, break
down sales results into Low, Medium, and High.

• reduce the number of values into a smaller, more meaningful set .For
example, change a list of employees into My Team and Others.

You cannot collapse a report that contains custom groups.

Steps

1. Open the report that you want in Query Studio.

2. Click the heading of the report item for which you want to create a custom
group.

3. From the Edit Data menu, click Define Custom Groups.

4. In Customization type, choose how to define the values:

• To create a group of values based on individual items, click Individual


values. In the New group name box, type a name, and click the down
arrow link to add it to the Custom groups box. In the Available values
box, click the values you want, and click the left arrow link to add
them to the Custom group values box.

13 of 19
COGNOS – Best Programming Practices

• To create a group of values by defining a range, click Ranges.

In the New range name box, type a name. In the From and To boxes,
specify the criteria you want, and click the arrow link to add to the
Ranges (in sequential order) box.

5. In the Item name box, type a name for your report item.

6. Click OK.

10.0 Report Studio

Report Studio is a Web product for creating reports that analyze corporate data
according to
specific information needs. This tool provides options for customizing and formatting
data to great extent. Report Studio reports can be burst and scheduled to run at required
frequencies.
10.1 Planning Reports

Before you use Report Studio to design and create a report, some information is
required. For each report, answer the following questions:

• Who is the target audience?

• What business question do you want to answer?

• Which type of report will best answer the business question?

• What are the data sources, and where are they?

• Which query items and calculations are needed?

• What are the security needs?

• How will the report be distributed?

Answering some of these questions involves working with other Cognos 8


components. For example, Framework Manager is the metadata tool used to model
your enterprise data. Models created in Framework Manager provide the query
items that you use in reports.

10.2 Working with Layouts

The challenge in laying out a report is in performing a mental translation of a desired


layout to the layout objects available in Report Studio. Create templates of reports
which can be used by the developers based on the below guidelines. The templates
should have the standards in place. Use the following steps to help you perform this
translation:

14 of 19
COGNOS – Best Programming Practices

 Define the page structure

Determine what goes into the page header, body, and footer. The page header
contains information that appears at the top of each page. The page body contains
information that starts on the first instance of the page and continues across all
instances of the page, in the case where there is too much data to fit on a single
page. The page footer is similar to the page header, except the information appears
at the bottom of each page.

 Identify horizontal bands of information

Look for natural horizontal bands of information running across the page. Each of
these typically translates into a block.

 Identify vertical bands of information

Within each horizontal band of information, look for vertical bands that run up and
down the page. Each of these typically translates into table cells.

 Decide which data frames to use

Determine whether a list, crosstab, chart, repeater, or text frame should be used to
lay out the data.

10.2.1 Guidelines

To work efficiently in Report Studio, follow these guidelines when laying out
reports:

 Set properties at the highest level item possible

When you set properties at the highest level, you set it once instead of having to set
them for each child object. For example, if you want all text items in a report to
appear in a specific font, set the font for the page.

 Use padding and margins to create white space

Do not use fixed object sizing unless it’s absolutely necessary. When you specify that
an object have a fixed size, your layout becomes less flexible.

Use Tables to Control Where Objects Appear


In addition to the Container Alignment tool, you can use tables in your report to
control where objects appear. Tables can be inserted anywhere in a report, such as a
header, a footer, or the page body. After you create a table, insert the objects you
want in the cells.

Steps

1. Open the report that you want.

15 of 19
COGNOS – Best Programming Practices

2. In the Insertable Objects pane, click the Toolbox tab.

3. Drag Table to the report. The Insert Table dialog box appears.

4. In the Number of Columns and Number of Rows boxes, type the number of
columns and rows you want the table to have.

5. To have the table span the width of the report page, select the Maximize Width
check box.

6. To add borders to the table, select the Show Borders check box.

7. Click OK.

Add a Header or Footer


Add a header or footer to make a report easier to read. You can use headers and
footers to provide additional information or to organize data into logical sections to
identify every change in value of the column.

If you add an overall header or footer to a list, the header or footer is a container in
which you can add objects like text and images. In addition, the containers
themselves can be modified. You can

 Split a container into multiple cells that span the report (Structure menu, Split
List Row Cell)

 Merge multiple cells, with the (Structure menu, Merge List Row Cells)

 Add rows to a container (Structure menu, Insert List Row Cells Above and Insert
List Row Cells Below)

Steps

1. Open the report that you want.

2. Click a column. If you have a list and you grouped one or more columns, you can
also add grouped columns as headers and footers.

3. To add a header, click the Create Header button.

4. To add footer, click the Create Footer button.

5. To add or remove overall headers or footers in a list, from the Structure menu,
click List Headers & Footers, and select or clear the appropriate check boxes.

Create a Calculation
Create a calculated column to make a report more meaningful by deriving additional
information from the data source. For example, you create an invoice report, and

16 of 19
COGNOS – Best Programming Practices

you want to see the total sale amount for each product ordered. Create a calculated
column that multiplies the product price by the quantity ordered. There are two
types of calculations, Query calculation and Layout calculation. Layout calculations
are used for manipulation of dynamic information like prompt values and page
numbers.

Steps

1. Open the report that you want.

2. In the Insertable Objects pane, click the Toolbox tab.

3. Drag the Query Calculation or Layout Calculation object to the location where you
want to create a calculation. The Create Calculation dialog box appears.

4. In the Name field, type the name of the calculation

6. Click OK.

7. In the Available Components box, define the calculation:

 If you want to include query items not shown in the report, in the Model
tab, click query items.

 If you want to include query items that are in the report but not necessarily
in the model, such as calculations, in the Query Items tab, click query items.

 If you want to add functions, summaries, and operators to the filter


expression, in the Functions tab, click elements.

 If you want to add parameter values, click on the parameters tab.

8. Click the validate expression button, and click OK.

10.3 Formatting Standards

 Decide the Font, Colour, Size, of each report entity


 Decide the alignment of each report entity based on the data type and the
placement of data
 Decide the format of numbers, dates, currency, Page Number of each report
entity
 Decide the Prompt pages layout with necessary logos, text, header, footer and
background.
 Decide the type of prompts for each requirement. E.g value prompts where single
value has to be selected from a list etc.,
 Have proper headings for each column, Prompt, Page, Summaries, ReportNames,
Page Number
 Have the User ID, page number, time of report generation, Report Name and the
filter values selected (Prompt) for each report.

17 of 19
COGNOS – Best Programming Practices

 Test the report with different layouts with complete data.


 Have proper Report Naming standards with proper descriptions.
 For reports that use lots of images, to improve performance use reference links
for specifying location of images.
 Minimize use of cross tabs for reports that use extensive conditional formatting.
 If Query items or calculations are placed in Page body or tables outside lists,
crosstabs and charts, it is recommended to associate the page to the query which
contains this query item.
 Make use of report level summaries where ever possible instead of creating
separate query level calculations.

10.4 Reporting Entities

User the formatting standards for each of the below reporting entity. Strictly avoid developers
from specifying values for each cell or entity. Let the Developers select the Reporting Entity
from the Class property which can be later changed globally through the XSL.

10.5 Working with Queries

The Query tab provides options to arrange and define associations between queries. Queries
are containers for holding data items, report level query calculations and filters. If using a multi
dimensional data source, slicers in queries can be used to provide dimensional filters on
measures.

10.6 Query Standards

 Set the Aggregate, Rollup Aggregate and Presort properties for data items as
needed.

 Arrange data items in the order of grouping needed. Identifiers and attributes
need to be placed above measures.

 For calculations that do not use measures, set the aggregate and rollup
aggregate properties to None or Automatic. Text and string values can have this
property set to None while data fields can have these properties set to
Automatic.

 Minimize usage of inline calculations in data items using If-then functions.

 Usage of vendor functions pushes calculations to be done on the database side


and may help increase query performance for majority of reports, though
exceptions may exist.

 Arrange filters such that data is retrieved quickly. For example, filters on
dimensional tables can be placed before filters on fact tables.

 Set filter usage to Before Aggregation or After Aggregation as required.

18 of 19
COGNOS – Best Programming Practices

 For filters using parameter values, use “in” clause for multi select prompts, and
“=” for single select prompts.

 Filters using parameters associated with optional prompts should have usage
set to Optional. Else the prompt will function as a required prompt, and not an
optional prompt.

 Avoid using hardcoded SQLs in queries. Instead use query items from packages
to derive full benefit of the advantages of metadata modeling Cognos provides.
Using hardcoded SQLs also makes maintenance difficult.

 While combining two or more queries to form one single query, usage of outer
joins has to be minimized as outer joins slow down report performance.

 If a query is created by combining two or more queries (using union or joins),


report level calculations (like aggregation calculations) are recommended to be
placed in the resultant combined query than in the child queries to prevent
iterative calculations at every child query level.

 To enable concurrent processing of queries, parallel processing parameters


should be set in server configuration tab in Cognos Connection.

19 of 19

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy