如何在jasper报告中使用divide()方法? [英] how to use divide() method in jasper reports?

查看:324
本文介绍了如何在jasper报告中使用divide()方法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用iReport1.3.3工具创建pdf和xls模板..
我的问题是针对以下表达式,

Im using iReport1.3.3 tool to create pdf and xls template .. My problem is for the below expression,

     ($V{strloanNo}).divide($V{loanCalculation})

我需要划分两个变量,但我没有得到预期的结果。它显示null值。

i need to divide both the variables but i am not getting expected result. it is displaying "null" value .

任何想法的人?

推荐答案

$V{x}.divide( $V{y} )

这对我有用。

看起来你的变量是空的。

It looks like your variables are Null.

确保在变量中设置初始值表达式属性。

Make sure to set the Initial Value Expression in the variable's properties.

我将我的两个都设置为以下。

I set both of mine to below.

new java.math.BigDecimal(10.0)

这篇关于如何在jasper报告中使用divide()方法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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