使用iReport做报表时,需要将金额转换成"1,000,000.00"格式。

1、确定Field为数字类型(BigDecimal),即传入的数据对象金额属性的数据类型也为BigDecimal;

iReport数字金额格式化

iReport数字金额格式化

2、在报表模板中,设置Text Field标签的属性:

(1)Expression Class  :  java.math.BigDecimal

(2)Pattern  :  #,##0.00

iReport数字金额格式化

相关文章:

  • 2021-12-27
  • 2021-09-05
  • 2021-09-16
  • 2021-07-13
  • 2022-03-02
  • 2021-12-19
  • 2021-04-21
猜你喜欢
  • 2021-08-26
  • 2021-12-21
  • 2022-01-25
  • 2022-01-19
  • 2021-11-02
  • 2021-03-28
相关资源
相似解决方案