Preventing divide by 0 in reports

I am having an issue with a calculated value in a report. It is a calc based on running totals of a shift. Whenever the equipment is not running, all totals are 0s and one of the calculations ends up being 0/0 which causes infinitey to show on the reports.

How to prevent this or force a 0 ?




as a quick fix, I added 0.001 to the divisor as this # is usually quite large and an addition 0.001 will not effect accuracy, and problem resolved, calculation now results in 0.00

You can also do something like this in the report:@Shift1.total.Patent_B+Shift1.total.Clears_B = 0 ? 0 : (((Shift1.total.Wheat_to_Roll_B/60) / (Shift1.total.Patent_B+Shift1.total.Clears_B)) * 100)I know it is more complicated.