COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: cognosun on 15 Nov 2012 05:10:14 AM

Title: no rounding should happen
Post by: cognosun on 15 Nov 2012 05:10:14 AM
Hi,

I have a decimal value , 2359945.88570883

We need to divide it with 1000 ( or use scale = -3) then the value in Cognos is becoming as  -->  2359.94588571

i.e 2359945.88570883/1000 -->  2359.94588571

If you observe, the output value got rounded ( it rounded last 4 digits 0881 to 1)

Is there any way to avoid this...I mean if I divide it with 1000, the ouput should be full value, i.e. 2359.94588570883 ( no rounding should happen)

We are on Cognos 8.4, Oracle

Many thanks in advance,
Joys
Title: Re: no rounding should happen
Post by: cognosun on 16 Nov 2012 02:25:05 AM
no ideas :-)
Title: Re: no rounding should happen
Post by: hanht on 16 Nov 2012 03:36:33 AM
Hi,

I think you need convert fixed it.
I created Data Item1 as value 2359945.88570883
and Data Item2 as : cast([Data Item1]/1000 as decimal(16,12))
Then has result :
Data Item1                   Data Item2
2,359,945.88570883   2,359.94588570883
Title: Re: no rounding should happen
Post by: cognosun on 19 Nov 2012 02:49:58 AM
hi hanht,

Is the 'decimal' any oracle function ?

I'm getting processing error if I use it in cognos.
Title: Re: no rounding should happen
Post by: hanht on 19 Nov 2012 08:10:32 PM
hi,

I launch a new report studio & do steps at I said above, not get error.
Can you tell me the detail you did?

Sincerely