Is the database customized. Start the debugger and check where the error comes. I remember the error used to come when I started using upgraded 4.0 sp3 database, but now i do not remember the solution/cause. Some details might help to remember.
Problem is that if you make some "Workaround" to not have this error, you can be in big troubles, becuase you haven't solved the core problem, just the effect. And it can lead e.g. to some costing problems in future (just example). In most cases, when you get this error, it means that the data are wrong. In cases, when you can assume, that the divider will be zero, there will be appropriate condition. If it is not there, you can assume that when the divider is 0, there is some problem because it cannot be zero from the logic.
Conclusion: just think about the meaning of the code, do not just blindly make "workaround" to prevent this error. There can be deeper problem in this. 8)
Problem is that if you make some "Workaround" to not have this error, you can be in big troubles, becuase you haven't solved the core problem, just the effect.
=D> Finally some intelligence in this thread
It's true, rather than write code to blindly prevent the division by zero, it would be better to put in a different, more descriptive, error message. We're so bent on "division by zero should not happen", but forget the underlying problem.
If the process needs to divide by a quantity, and that quantity is 0, the original line is not correct, so the error message should still come up, but with a descriptive message (something like "there is nothing to divide" )
Problem is that if you make some "Workaround" to not have this error, you can be in big troubles, becuase you haven't solved the core problem, just the effect. And it can lead e.g. to some costing problems in future (just example). In most cases, when you get this error, it means that the data are wrong. In cases, when you can assume, that the divider will be zero, there will be appropriate condition. If it is not there, you can assume that when the divider is 0, there is some problem because it cannot be zero from the logic.
Conclusion: just thing about the meaning of the code, do not just blindly make "workaround" to prevent this error. There can be deeper problem in this. 8)
Perfect example is we were trying to show on a form the actual quantity on hand QOH / Item."Sales Unit Of Measure".
Once in a while we get the division error. So as stated above the deeper problem was that someone was not filling in the UOM fields. So the next step was making the UOM mandatory. Therefore solving the deeper underlying problem.
Comments
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
Interesting. Is this 3.56? I never knew that this version was even released in India.
Either way this looks like an error in the Invoice Report, probably some code to print the unit cost by dividing the Amount by Quantity.
Its going to be very hard to fix though, because you will find it very difficult to even find a developer with a license.
Is there are some customized code?
Did you have checked the source with using the debugger?
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
http://ssdynamics.co.in
And where there? Is there some customized source or is it all "standard".
Copy the codesnippes and the functionname here for a better help.
Regards
RIS Plus, LLC
Maybe how he can prevent the division by zero .....
RIS Plus, LLC
if C=0
then a=0
else A := B / C
http://www.BiloBeauty.com
http://www.autismspeaks.org
RIS Plus, LLC
A := RAND(1);
which save a lot of lines of code. \:D/
RIS Plus, LLC
Conclusion: just think about the meaning of the code, do not just blindly make "workaround" to prevent this error. There can be deeper problem in this. 8)
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
|To-Increase|
It's true, rather than write code to blindly prevent the division by zero, it would be better to put in a different, more descriptive, error message. We're so bent on "division by zero should not happen", but forget the underlying problem.
If the process needs to divide by a quantity, and that quantity is 0, the original line is not correct, so the error message should still come up, but with a descriptive message (something like "there is nothing to divide"
RIS Plus, LLC
Perfect example is we were trying to show on a form the actual quantity on hand QOH / Item."Sales Unit Of Measure".
Once in a while we get the division error. So as stated above the deeper problem was that someone was not filling in the UOM fields. So the next step was making the UOM mandatory. Therefore solving the deeper underlying problem.
http://www.BiloBeauty.com
http://www.autismspeaks.org