YANKRAY
Technical User
- Nov 7, 2003
- 283
Crystal Reports 10.0
I am using a formula to determine cost per item. I divide the total cost by the Quantity to get this value.
Some of the items have a Quantity, but no total Cost.
Crystal gives me a "Division by Zero" error when using this formula:
if({BI_INVENTORY_VALUE.COST} / {BI_INVENTORY_VALUE.QUANTITY}) = 0 then
0.00 else {BI_INVENTORY_VALUE.COST} / {BI_INVENTORY_VALUE.QUANTITY}
How can I write the formula so I will not get the error?
Thanks,
Ray
I am using a formula to determine cost per item. I divide the total cost by the Quantity to get this value.
Some of the items have a Quantity, but no total Cost.
Crystal gives me a "Division by Zero" error when using this formula:
if({BI_INVENTORY_VALUE.COST} / {BI_INVENTORY_VALUE.QUANTITY}) = 0 then
0.00 else {BI_INVENTORY_VALUE.COST} / {BI_INVENTORY_VALUE.QUANTITY}
How can I write the formula so I will not get the error?
Thanks,
Ray