Jump to content
Changes to the Jaspersoft community edition download ×

new DecimalFormat() - 2 decimal points


K.S.

Recommended Posts

Hi, all!

I have 2 Integer Fields: Val1 and Val2. And I want to calculate the division of two values. I create Variable_1 with a Expression new DecimalFormat("0.00").format($F{Val1} / $F{Val2}).

For example Val1 =349 and Val2 = 335. According to the expression I get Variable_1 = 1.00

I need the expression to be Variable_1 = 1.04

What I'm doing wrong in this case?

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