Guidelines For Report Development in Cognos
Guidelines For Report Development in Cognos
Guidelines For Report Development in Cognos
Introduction
This document is intended to provide guidelines for development of reports.
2. Intended Audience
Cognos Report Developers.
3. Program Objectives
Document is intended to explain how to utilize the available cognos features to get maximum results from
your Cognos development.
4. Program Structure
Calculations
Try to move as many calculations as possible into the model so your query doesn't have to do them
for every row of data pulled.
Place calculations strategically. Rather than include a calculation in a CASE statement in multiple
places, do it once in a separate field and then refer to it in multiple places. This minimizes processing
time.
Sorting
When sorting a field, sort it either at the tabular model level or the query levels but not both.
Rows per page
In report studio developer can set the rows per page for a list, (view - list - properties - rows per page)
this will override the default of 20 rows per page permanently
Query Processing:
There are two types of query processing available in cognos i.e. Database and Local Processing
Local Processing: Setting report processing to local enables the processing of data locally
Database: If set to database only this will force the work to be done at the database end
Joins
Do not use Outer joins between tables if they can be avoided.
Functions:
Where possible use database functions for calculations instead of their equivalent Cognos functions.
Setting Sizes:
Fixed Column widths: Try to use fixed column widths where possible. Dynamic sizing increases the
execution times—As once it has to find the largest data content, then dynamically size the columns
based on the largest data content
Tables
Developer should use tables can be helpful in achieving complex formatting on reports. They can go
anywhere -in list columns, in headings, on the background (and list controls should generally always
sit within a table cell so you can add items above and below the list). There is no overhead with tables
and they are a great way of keeping control of output if used well.
When working within table cells, always set the vertical and horizontal alignment the cell to control
what happens if the objects within the cell don't fill it - again, take control of the output. You can set
cell attributes for a wide range of cells in a table by control-clicking on opposite corners
In particular, remember that the default width for tables is 100% of their parent or container object.
This is generally desirable 'within' other tables and list columns and the like - however at the outer
levels it is almost certainly something to delete and leave the width setting to blank. The table (and/or
list) will then size correctly to be as wide or narrow as it needs to be rather than stretching
unnecessarily.
Visibility of objects
Quite often it is necessary to control when an object appears and when it doesn't. If this is a simple
yes or no, always use the rendering control rather than conditional blocks/formatting - much simpler
and less hassle within report studio.
4.4. Tuning:
Grouping:
Do not use group items if not required on the report as it would impact the performance.
Sort Memory
It is the amount of memory that Cognos 8 uses to sort then data which has been retrieved from the
database. Editing Sort Memory is required when you see that large reports are taking long time to
display results in Cognos Viewer even after the database has processed the request.
The Sort Buffer Size is in MB (default value is 4 MB) parameter under Environment in Cognos
Configuration needs to be modified. The value can be modified to 16 or 32 MB as required. For the
changes to effect you need to save the settings and restart the service.
Session Caching
When the user runs the report, a query is created for which the request is passed to the Database
server. The database processes the request sent and returns the result set to cognos BI server. If the
report author sets the
If the Report Author sets the Use Local Cache property to yes then after the initial report execution. If
the user runs the report again the cached data can be used without querying the database again
If the Author want to always execute the query whenever the user runs the report the property should
be set as ‘No’ else set the property to ‘Yes’ to use cached results.