divide by zero error on a date filter?

rkucharrkuchar Member Posts: 33
Ok, new... but related problem to my last post:


When I tried to use this filter on the Value Entry table (I am filtering the Cust./Item Statistics report this time) it gives me a "divide by zero" error.

Why would this formula divide by zero on one report - and yet work fine on the Sales Order Status report 5 minutes earlier?

This works fine:
SL.SETRANGE("Shipment Date", CALCDATE('<-CM>', TODAY), CALCDATE('<+CM>', TODAY));
SL = Sales Line table

This results in divide by zero
VE.SETRANGE("Posting Date", CALCDATE('<-CM>', TODAY), CALCDATE('<+CM>', TODAY));
VE = Value Entry table

Comments

  • David_SingletonDavid_Singleton Member Posts: 5,479
    What is the code that is causing the error?

    And are these standard Navision reports, or reports you modified/created?
    David Singleton
  • DenSterDenSter Member Posts: 8,307
    SETRANGE doesn't cause a divide by zero error. Some times the debugger doesn't line up properly so it might look that way. The cause of a 'divide by zero' error is a division by zero. You need to find the command that does a division and take care of zero values of the denominator.
Sign In or Register to comment.