|
Re: Custom number format - is there a description ? [message #630113 is a reply to message #630014] |
Thu, 30 September 2010 16:23 |
|
Anatoly,
Take a look at:
http://download.oracle.com/javase/1.4.2/docs/api/java/text/D ecimalFormat.html
The , is the grouping separator and will be used in the US locale but
will be replaced if you use French locale.
You can always replace the grouping separator in script as well. Select
the data item or aggregation element and create the following onRender
Script:
var aggval = this.getValue();
importPackage(Packages.java.text);
unusualSymbols = new DecimalFormatSymbols(reportContext.getLocale());
unusualSymbols.setDecimalSeparator('.');
unusualSymbols.setGroupingSeparator(' ');
patt = "###,###.00";
myForm = new DecimalFormat(patt, unusualSymbols);
myForm.setGroupingSize(3);
mystr = myForm.format(aggval);
this.setDisplayValue(mystr);
Jason
On 9/30/2010 7:45 AM, Anatoly wrote:
> I need to format my float column in table as "XXX XXX XXX." (When the
> value is 3123977.12 i want to see "3 123 977.")
>
> I can easy get "3,123,977." (format as Custom, format code "###,###."),
> but when i change "," in format code to any other symbol - it don't work
> as 1000's separator, only adds to end of number ("###+###." create
> "3123977.+", "### ###." create "3123977. ").
>
> Is there a full description of format number code masks ?
>
> Thank you !
|
|
|
|
Powered by
FUDForum. Page generated in 0.03108 seconds