如何在iReport中显示印度编号格式? [英] How to display Indian Numbering format in iReport?

查看:78
本文介绍了如何在iReport中显示印度编号格式?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用iReports生成报告。我想以印度编号格式显示GrandTotal字段。
例如,

I am using iReports to generate Reports. I want to display the GrandTotal fields in Indian Numbering Format. For Example,

Value: 1,000,000 should be displayed as 10,00,000

我尝试使用Pattern of text字段属性,但无法获得结果。
在一些论坛中,他们提到使用JRParameter.REPORT_LOCALE。我试过这种方式

I tried using Pattern of text field properties, but not able to get the result. And in some forums they have mentioned to use JRParameter.REPORT_LOCALE. I tried this way

Locale locale = new Locale("en", "IN");
parameters.put(JRParameter.REPORT_LOCALE, locale);

其中参数是一张地图,然后用于填写报告。

where parameters is a map which is then used to fill report.

感谢任何帮助

谢谢

推荐答案

如果您使用
ICU4J ,您可以执行类似

If you use ICU4J you can do something like

com.ibm.icu.text.NumberFormat.getCurrencyInstance(new Locale(en,in))。format(new Java.math.BigDecimal($ {FIELD_HOLDING_THE_VALUE}));

ICU4J的NumberFormat在这个主题

NumberFormat of ICU4J is explained in this thread

这篇关于如何在iReport中显示印度编号格式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆