문제

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.

도움이 되었습니까?

해결책

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top