Hi guys,
I have a problem.I am new to navision development.I hv designed a report.When I run that report on the 107th page I get a error Division by zero.I dont think its practical to debug it.
Can anyone please tell me how can i handle the error & whats the exact syntax to do it.
Thanks in advance.
0
Comments
Handling the error, I'm afraid, involves not dividing by zero!
Jan Hoek
Product Developer
Mprise Products B.V.
Jan Hoek
Product Developer
Mprise Products B.V.
RIS Plus, LLC
In some languages there's an infinitesimal value that we can use to solve those kinds of problems, i.e.:
instead of:
y=x/z
we use:
y=x/(z+min)
min is the infinitesimal value.
Does navision has a function/constant anything that returns the minimum value that the system accepts?
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
why?
What I mean is, the developer will should catch the division by zero.
if they are missing it now in their code, they will still miss adding (min) in their code.
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
It appears you agree with me a lot.
http://www.mibuso.com/forum/viewtopic.php?t=11694&highlight=
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
If you don't have any sales, sales price etc. then the profit is obviously 0 - so code it this way.