Jump to content
We've recently updated our Privacy Statement, available here ×

Number format display(Indian Format).


nikitha

Recommended Posts

Hi,

I am using iReport 2.0, i have done a report which displays the price with thousand separtor(Exampple: 10,001,000.00) the regular expression used is(#,##0.00).

Here, i have one problem, i want to display the format as (1,00,01,000.00)

How can i set this format using iReport tool.

Please reply me....

Thanks and regards,
Nikitha.

Link to comment
Share on other sites

  • Replies 5
  • Created
  • Last Reply

Top Posters In This Topic

Yes, i have tested but still it is not working with this format(#,##,##,##0.00).

I have used with Text Field Expression as : java.math.Decimal with the pattern mentioned above.

Here, i am attaching the file, please look in to this report.

Please, hlep me.


Naveen. [file name=RptC_OrderPO.pdf size=17206]

Link to comment
Share on other sites

output from java.text.NumberFormat/DecimalFormat

Hindi (India): #,##0.### -> ???,???,???.?? -> 1.1990292056E8
English (India): #,##0.### -> 119,902,920.56 -> 1.1990292056E8

not good...

http://www.icu-project.org/apiref/icu4j/
com.ibm.icu.text.NumberFormat
extended by com.ibm.icu.text.DecimalFormat
Download and drop in your iReport/lib folder and add to classpath - restart iR

Seems to provide the output you desire.
Hindi (India): #,##,##0.### -> ??,??,??,???.?? -> 119902920.56
English (India): #,##,##0.### -> 11,99,02,920.56 -> 119902920.56
(textfield expression)

Code:
new com.ibm.icu.text.DecimalFormat(" #,##,##0.00").format($F{somenumber})[/code]			

Post edited by: momzilla, at: 2008/03/26 02:33

Link to comment
Share on other sites

  • 8 years later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...