|
-
Sep 21st, 2006, 10:36 AM
#1
Thread Starter
Lively Member
[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?
-
Sep 21st, 2006, 11:00 AM
#2
Lively Member
Re: Divde by Zero? Strange Error.
 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
Energy can be neither created not destroyed. It can only be wasted.
Red Green
-
Sep 21st, 2006, 11:05 AM
#3
Thread Starter
Lively Member
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
-
Sep 21st, 2006, 02:32 PM
#4
Lively Member
Re: Divde by Zero? Strange Error.
 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...
Energy can be neither created not destroyed. It can only be wasted.
Red Green
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|