Question

I want to give a pattern in cognos. like this

my number : 12.20

my wanted number : 12.2 i want to delet 0 how I give pattern.

Was it helpful?

Solution

If no data format is mentioned, then the default format will take care of trailing zeros.

But if you are using some data format (number, currency) then the trailing zeros will be added till the mentioned decimal places in your format.

To suppress a digit if the value is zero, you can use pattern attribute in the Data Format property.

In your example, to suppress 2nd decimal place zero, you can mention the pattern as

.0#

With this pattern, first decimal place digit will be shown even if the value is zero. Whereas, second decimal place digit will not be shown even if the value is zero.

Please refer to IBM Cognos inforcenter for Decimal Format Symbols for the Pattern. http://publib.boulder.ibm.com/infocenter/c8bi/v8r4m0/index.jsp

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top