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

Jaspersoft Studio - Variable with formula


prakash.reddy

Recommended Posts

Hi,

I'm new to Jasper Reports. I'm using Jasper Studio to create reports and as part of requirement i have to use a variable to get the % of the fields. So added a variable with expression field2/field1 in the expression editor. I'm getting compilation error.

The operator / is undefined for the argument type(s) java.math.BigDecimal, java.math.BigDecimal

                value = ((java.math.BigDecimal)field_TARGET_SUC.getValue()) / ((java.math.BigDecimal)field_TARGET.getValue()); //$JR_EXPR_ID=8$
 

can any one help me to fix it.

I'm not sure what to select for Value Class name for calculations ?

thanks

 

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...