nikitha Posted March 20, 2008 Share Posted March 20, 2008 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 More sharing options...
svenn Posted March 20, 2008 Share Posted March 20, 2008 Did you try typing the pattern directly in the pattern box? #,##,##,##0.00 Link to comment Share on other sites More sharing options...
nikitha Posted March 21, 2008 Author Share Posted March 21, 2008 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 More sharing options...
svenn Posted March 24, 2008 Share Posted March 24, 2008 Take a look at this post. I think that you will need to use a Locale object and a number formatter to get what you want. http://www.jasperforge.org/index.php?option=com_joomlaboard&Itemid=215&func=view&id=11348&catid=9 Link to comment Share on other sites More sharing options...
momzilla Posted March 26, 2008 Share Posted March 26, 2008 output from java.text.NumberFormat/DecimalFormatHindi (India): #,##0.### -> ???,???,???.?? -> 1.1990292056E8English (India): #,##0.### -> 119,902,920.56 -> 1.1990292056E8not good...http://www.icu-project.org/apiref/icu4j/com.ibm.icu.text.NumberFormatextended by com.ibm.icu.text.DecimalFormatDownload and drop in your iReport/lib folder and add to classpath - restart iRSeems to provide the output you desire.Hindi (India): #,##,##0.### -> ??,??,??,???.?? -> 119902920.56English (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 More sharing options...
sridhar.m Posted November 12, 2016 Share Posted November 12, 2016 Please do check this i ve made the java code to jar and pass them as scriptlet in Jasper report its in detail in the video Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now