How to truncate numeric values in a Cognos 8 Report Studio report.

Technote (troubleshooting)


Problem(Abstract)

There may be circumstances where a numeric value needs to be truncated rather than rounded.
If formating is applied then rounding occurs.

Symptom

Value does not match what is required.

Environment

Relational data source.

Resolving the problem

Set the Query Calculation Data Item expression as follows:


    trunc([calc])
    or
    cast(cast([calc]*100,integer), decimal(19,2))/100

The value of 100 will need to be adjusted based on the number of decimal places required.
The decimal(19.2) values may be adjusted as required.

Cross Reference information
Segment Product Component Platform Version Edition
Business Analytics Cognos Business Intelligence Report Studio AIX, HP-UX, HP Itanium, Linux, Solaris, Windows 8.3, 8.4, 8.4.1

Rate this page:

(0 users)Average rating

Document information


More support for:

Cognos 8 Business Intelligence
Report Studio

Software version:

8.3, 8.4, 8.4.1

Operating system(s):

AIX, HP Itanium, HP-UX, Linux, Solaris, Windows

Software edition:

All Editions

Reference #:

1443585

Modified date:

2011-03-31

Translate my page

Machine Translation

Content navigation