如何在jasper Reports中将String转换为Double值? [英] How to convert String to Double value in jasper Reports?
本文介绍了如何在jasper Reports中将String转换为Double值?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在jasper Reports中将String转换为Double值?我在.jrxml文件中有两个字段,如下所示:
How to convert String to Double value in jasper Reports? I am having two fields in .jrxml file like below
<field name="secRate" class="java.lang.String"/>
<field name="secPrice" class="java.lang.String"/>
我需要将两个字段都减去
i need to subtract both the field
$V{Variable} = $F{secRate} - SF{secPrice}
我尝试过这种方法,但是没有用
i tried this way but not working
(new Double(Double.parseDouble($F{mktVal})))
有什么主意吗?请帮助我..
any idea? please help me guys..
推荐答案
new Double(Double.parseDouble($F{secRate}) + Double.parseDouble($F{secPrice}))
这篇关于如何在jasper Reports中将String转换为Double值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文