copy loop problem in nav 2018 report

I have tried to run the standard NAV purchase order report 405 in a NAV 2018 database. It falls over in the copy loop data item with this line of code

SETRANGE(Number,1,NoOfLoops); NoOfLoops evaluates to 1 in this case

This causes an ‘out of memory’ error and Nav closes


If I comment out this code and the other places where there is a similar filter set (e.g. SETRANGE(Number,1,PurchLine.COUNT in the round loop data item) then the report runs.

I have found the same problem with other (standard) reports that have similar filter lines

I have run the same report in a different client (same version of nav 2018) it runs without problem.

Any explanations most welcome!



It’s an issue with your “data” - not the report. The report was last time updated on Cumulative update 09 - and that was a year ago.

I guess your problem is that you have an order with no lines at all?


Thanks for the response. The data is fine - I have checked that carefully.

I have narrowed it down a bit further - the problem only occurs when the report tries to set a filter like ‘SETRANGE(Number,1,10)’ on the system Integer table. ‘SETRANGE(SalesLine.“Line No.”,0,100000)’ works fine where the data item SalesLine is a normal navision table.

And the reports run fine in one implementation but not in another. Which makes me think it is a configuration / sql setup / environment issue, which are not my areas of expertise.



The Integer Table is an internal NAV table so I highly doubt it. If the Report has not been changed, then it have to be data.

You could try to create a simple report with with one table - Integer, and in view and properties type 1 in min value and 10 in max value. If that report runs then it is a data issue.


It is definitely NOT a data problem. I replaced the system integer table with a normal navision table populated with integers, and then ran the same SETRANGE code on this table and it worked fine.

I also created a page looking at the system integer table and set the table view to 1…10. The same thing happened with navision running out of memory and crashing.

I don’t have this problem on the other 2018 implementation, so in my mind it must be a problem outside of navision.



Could you check if the build no. of the two implementations are the same. And give me the Build No. of the faulty one, then I can chech with HQ if they have seen such an error before in that build.


Thanks for persisting with this.

Both are using 11.0.23019.0 which I believe is CU7. I looked at the date stamp on the finsql.exe file and in the one that works it is 18/07/18 and for the one that doesn’t work it is 28/06/18. Not certain how this discrepancy occurred as they were both installed from the same ‘DVD’. I didn’t do the installations so can’t explain this discrepancy.