Jump to content
We've recently updated our Privacy Statement, available here ×

Problem with condintional in a variable expr.


Gorrex

Recommended Posts

I'm trying to use a conditional in a variable's expression field.

 

This is what I have:

 

$V{FieldName}.intValue() = 0 ? ($V{FieldName}.movePointLeft( 2 )).divide($V{FieldName}.movePointLeft( 2 ),6,RoundingMode.UP) : null

 

I'm getting this as an error:

 

1. The left-hand side of an assignment must be a variable value = (java.math.BigDecimal)(((java.math.BigDecimal)variable_FieldName.getValue()).intValue() = 0 ? (((java.math.BigDecimal)variable_FieldName.getValue()).movePointLeft( 2 )).divide(((java.math.BigDecimal)variable_FieldName.getValue()).movePointLeft( 2 ),6,RoundingMode.UP) : null);//$JR_EXPR_ID=15$

 

I am rather new to java and coding in general any help would be greatly appreciated.

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...