Jump to content
Changes to the Jaspersoft community edition download ×

divisor is equal to zero?


2005 IR Help

Recommended Posts

By: Todd - tberman333

divisor is equal to zero?

2005-01-28 13:20

I have a field in a report that looks like this does a calculation and looks like this:

 

new Double( $V{Dealer_Balance}.doubleValue() / $V{Dealer_Limit}.doubleValue())

 

The problem is, I have come accross a case where the $V{Dealer_Limit} is equal to zero so it can't do the calculation.

 

Can someone tell me how to make this field ingnore the formula if $V{Dealer_Limit} is equal to zero (i.e. have it just print zero or null?

 

Thanks for the help.

 

 

 

 

By: Giulio Toffoli - gt78

RE: divisor is equal to zero?

2005-01-29 03:28

 

( ( {Dealer_Limit} != null && {Dealer_Limit}.doubleValue() !=0 ) ?

new Double( $V{Dealer_Balance}.doubleValue() / $V{Dealer_Limit}.doubleValue()) : new Double(0) )

 

 

 

 

 

 

 

By: Todd - tberman333

RE: divisor is equal to zero?

2005-01-31 05:41

Thank you very much for your reply!

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Popular Days

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