Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Division by 0 error

Status
Not open for further replies.

Crystalfire

Programmer
Jan 29, 2002
315
US
When using this formula I get a Division by 0 error.
Count ({CUST_ORDER_LINE.CUST_ORDER_ID}, {CUST_ORDER_LINE.CUST_ORDER_ID})/Sum ({SHIPPER_LINE.SHIPPED_QTY}, {CUST_ORDER_LINE.CUST_ORDER_ID})=0


Crystal 8.5
 
Why do you have the "= 0" at the end? I wonder what you are trying to do here. Doesn't it make more sense to divide the quantity by the count? Use:

If Count ({CUST_ORDER_LINE.CUST_ORDER_ID}, {CUST_ORDER_LINE.CUST_ORDER_ID})=0 then 0 else
Sum ({SHIPPER_LINE.SHIPPED_QTY}, {CUST_ORDER_LINE.CUST_ORDER_ID})/Count ({CUST_ORDER_LINE.CUST_ORDER_ID}, {CUST_ORDER_LINE.CUST_ORDER_ID})

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top