Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Numeric formatting with currency codes
rpolunsky
I have a numeric field that I want to show as:
CAD $854,334.38
My problem is that when the number goes negative I get:
-CAD $854,334.38
What I would expect to see is:
CAD -$854,334.38
Is that an odd expectation on my part? Is there a way to do this with standard BIRT number formatting codes, or will I need to convert numeric to string in Oracle and then prepend the "CAD"?
Richard
Find more posts tagged with
Comments
JasonW
Richard,
Set a custom format and use a pattern like:
¤###,##0.00;¤-#,##0.00
Jason
rpolunsky
Great! That's what I was looking for!
Are those documented anywhere? They look similar to Excel format patterns.
Richard
JasonW
Look at the JavaDocs for java.text.DecimalFormat:<br />
<a class='bbc_url' href='
http://java.sun.com/j2se/1.5.0/docs/api/java/text/DecimalFormat.html'>DecimalFormat
(Java 2 Platform SE 5.0)</a><br />
<br />
Jason