views:

43

answers:

2

Hi,

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

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

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

any idea guys?

A: 

Guess you can try this out -

$V{strloanNo}.floatValue()/$V{loanCalculation}.floatValue() 
Sachin Shanbhag
@Sachin... Both of the datatypes are BigDecimal. if i use / its throwing error..
Manu
+1  A: 
$V{x}.divide( $V{y} )

This works for me.

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)
Gordon
let me try..and inform you buddy..thanks for your effort
Manu