起初这个问题是iReport需要的。 我必须用逗号替换点号。我的问题是我们的数据库字段的类型是BigDecimal und因此不存在任何替换方法。 所以我改变了类型为String,但后来我得到这个消息:我如何用iReport中的逗号替换点?
[email protected] The type java.lang.CharSequence cannot be resolved. It is indirectly referenced from required .class files
我的代码如下所示:
new String($F{gewicht}.toString()).replace(".",",")
我能做些什么?
但是你需要格式化一个数字吗?看起来像一个[xy问题](http://meta.stackexchange.com/questions/66377/what-is-the-xy-problem),你使用区域设置和模式在碧玉报告 –