COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: squish88 on 05 Apr 2011 03:59:02 PM

Title: Numeric formatting is being completely ignored - SOLVED
Post by: squish88 on 05 Apr 2011 03:59:02 PM
Hi guys,
   So in a nutshell, Report Studio has decided to ignore the data formatting I've given it.  It's a calculated field that results in a number with 3 numbers after the decimal point (ie. 9999.123)   The goal is to have zero #'s after the decimal (ie. 9999).
    It's used in a crosstab.  In that xtab, I gave it a Data Format of Number, with "No. of Decimal Places" = 0 like I've done a million times before...    When the report's run to a standard HTML output, the formatting's ignored and the decimal places are displayed anyway.   I've tried using ceil, ceiling, floor, _round, converting it to a char and using rtrim and converting the result back to number, etc, etc, etc.   Nothing will trim off those dang decimal points.   Any idea why it's ignoring any/all attempts at trimming those decimal places?   Any help would be greatly appreciated.
Thanks,
    Jim
Title: Re: Numeric formatting is being completely ignored
Post by: PRIT AMRIT on 06 Apr 2011 02:57:44 AM
Strange though... what is the current datatype?
Title: Re: Numeric formatting is being completely ignored
Post by: blom0344 on 06 Apr 2011 02:15:40 PM
Any chance this has anything to do with cached HTML pages?
Title: Re: Numeric formatting is being completely ignored
Post by: jcrouch on 06 Apr 2011 03:45:45 PM
Just a thought, but are you sure you applied the formatting to the right part of the crosstab? It should be a Crosstab Intersection when applying to a measure column.

I have had fits with formatting before only to find I had the wrong object selected when I did the fromatting.
Title: Re: Numeric formatting is being completely ignored
Post by: squish88 on 07 Apr 2011 10:44:21 AM
@PRIT  It's a Float 64 field.

@blom0344  Gave cleaning out the cache a shot, unfortunately didn't help  :-(

@jcrouch  Good thought, but I was def. using the intersection.  Wish it was that easy!!  :-)
Title: Re: Numeric formatting is being completely ignored
Post by: jcrouch on 07 Apr 2011 01:10:27 PM
Quote from: squish88 on 07 Apr 2011 10:44:21 AM
@PRIT  It's a Float 64 field.

@blom0344  Gave cleaning out the cache a shot, unfortunately didn't help  :-(

@jcrouch  Good thought, but I was def. using the intersection.  Wish it was that easy!!  :-)

Have you tried rounding the number directly in the calculation?
Title: Re: Numeric formatting is being completely ignored
Post by: joecog on 07 Jun 2011 10:44:58 PM
Try put the same setting of the Data format to the Measures.
Will this helps?
Title: Re: Numeric formatting is being completely ignored
Post by: squish88 on 08 Jun 2011 09:06:39 AM
So, this was eventually solved.  It turned out to be that the contractor that had built the report had set the style variables at all levels of the crosstab (List Column Body, List Column, and List) rather than just at the List Column Body level.   I hadn't considered that a possibility, much less checked it at the other levels.  So, I'm all set now.   Thanks to everyone who tried to help!!!