Click to See Complete Forum and Search --> : [RESOLVED] Strange Error.


vbjohn
September 21st, 2006, 11:18 AM
I am getting a divide by zero error on this when I am calling it from VB.6 I am using Crystal 10.

If {Sales.Suggestion} = 'Lower' Then
Count ({Sales.Suggestion})

But when I just do.
Count ({Sales.Suggestion})
Then I do not get that error.

What is going on? Any ideas?

JaganEllis
September 21st, 2006, 07:37 PM
I would guess that the first formula has an implicit else that is returning 0 and that is being used elsewhere in a divide. Try changing it to

If {Sales.Suggestion} = 'Lower' Then
Count ({Sales.Suggestion})
else 1

vbjohn
September 22nd, 2006, 10:15 AM
got it thanks. :)