Tender expression for value assignment on a troublesome iReport variable

Asked

Viewed 68 times

1

Next people, I created a tender expression that based on the values of two variables of the same context ("group"), to bring me a media. But for some reason it is not working and I am doubtful. It follows the expression and the return of iReport.

Error filling print... Error evaluating Expression : Source text : $V{QtdViagens_1} > 0 ? new BigDecimal($V{QtdPessoas_1}).divide( new BigDecimal($V{QtdViagens_1})) : new BigDecimal("0")

1 answer

0

Try adding the toString();

$V{QtdViagens_1} > 0 ? new BigDecimal($V{QtdPessoas_1}).divide( new BigDecimal($V{QtdViagens_1})).toString() : new BigDecimal("0").toString()

make sure the variables are not null and put Expression Class: java.lang.String

Browser other questions tagged

You are not signed in. Login or sign up in order to post.