質問

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