If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

How to Prevent rounding of decimal places in Data Item in Report Studio

Started by dabturn, 28 Aug 2013 03:24:56 PM

Previous topic - Next topic

dabturn

Hello!

I have a data source (table) that has a column that contains a 6-decimal place value, never goes over 0 very often (unless totals are performed) e.g. 0.462561.  In my report I'm trying to keep Report Studio from rounding those values in a totals column e.g. 0.023809 becomes 0.024.  This RS report is replacing a legacy system report.  The old system calculates values using 3 decimal places (for some reason) instead of what the actual data is (6 decimal places), so this ends up skewing the totals slightly.  So I want to show the client both 3-DP and 6-DP totals, so that they can make a choice between the two.  From what I've read "IBM® Cognos® Business Intelligence uses the IEEE 754 default rounding mode known as half even...", so it seems to be unavoidable.

I tried changing formatting settings for the column in my report - restrict number of decimal places; even restrict to maximum number of digits, neither work to restrict rounding.

I've tried applying a function/calc to the query for that column:
cast(cast(TOTAL([RMS Data Dump].[Inspection Reports Rollup].[FTEs]),decimal), decimal(3,3))
based on:
Source: http://www-01.ibm.com/support/docview.wss?uid=swg21443585
...didn't work, kept giving me an error as it didn't like trying to CAST a TOTAL aggregate, or maybe something about the decimal place.  The field in Oracle is 15, 6, I tried 15, 3... still rounds when I figured out a more basic calc based on the above one.

I even went into Framework Manager and added a query item and adjusted the formatting (same as above, restrict it to 3 decimal places)... still rounds.

I don't have access to the data sources to make physical changes i.e. I am not allowed to add columns to the source data.

Anyone got any ideas on how to stop a simple report aggregate/total column from displaying rounded numbers?

Thanks,
dabturn

Lynn

Since it is Oracle you could try the trunc function.

trunc ( [YourNumber], 3 )

bdbits

Or you could use the Cognos function floor() and a multiplier.

(floor([YourNumber] * 1000))/1000

inu

Quote from: bdbits on 03 Sep 2013 01:14:48 PM
Or you could use the Cognos function floor() and a multiplier.

(floor([YourNumber] * 1000))/1000

But we cant use these functions in total of crosstab.. Can you please put some idea here.


Regards,
Inam