[RESOLVED] Divde by Zero? Strange Error.
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?
Re: Divde by Zero? Strange Error.
Quote:
Originally Posted by vbjohn
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?
Is it possible that Sales.Suggestion might be null? If it is, then it'll throw an error trying to evaluate a null value without using IsNull.
This is off the top of my head:
if not IsNull({Sales.Suggestion} ) then
If {Sales.Suggestion} = 'Lower' Then
Count ({Sales.Suggestion})
end if
else
0
end if
What are you trying to accomplish? Fill a text field?
HTH
Re: Divde by Zero? Strange Error.
That did not work. Still get the error.
What I am tring to do is...
I have a few labels in the detail section and then right next to it I have the formula fields.
For Ex: In the detail line.
Lower: 1
Middle: 0
Higher: 5
Re: Divde by Zero? Strange Error.
Quote:
Originally Posted by vbjohn
That did not work. Still get the error.
What I am tring to do is...
I have a few labels in the detail section and then right next to it I have the formula fields.
For Ex: In the detail line.
Lower: 1
Middle: 0
Higher: 5
Sorry then. That was the only thing I could think of when I read the post. What type of fields is the formula using eg. strings or integer or whatever? Oh yes try using double quotes " rather than single in the formula. I'm really grasping at straws here... :blush: