Array Length

Am running a report and getting getting this error

“The indexing 0 in the array is outside of the permitted range”

Ok Basically i have an array of type record and of length 200. Could this Len be the problem?


Array index starts at 1.

Thanx Jona. It has worked

Can we ask why you have an array of record 200, that appears as if you are doing something the wrong way.

Ok am making a report based on 2 tables. one is a setup table while the other a transaction table.

The setup table has appr. 200 records. First the report will read each of the 200 records one by one before filtering the transaction table based on that endity.

If there is a better approach on it plz let me know.


The correct approach is to index the table as required and filter against the appropriate field in the Setup table. But from the way that you are doing this, it sounds like you are writing VB or C++ code in the NAV envirnoment.

You need to understand how NAV and C/SIDE work, and use them correctly. I gather you have not been to formal NAV classes and are just learning as you go. So step one is to start looking at existing reports in the system, and look how they do it. Though before ANYTHING you need to learn NAV and how it works from the business side. I can also recommend This Book as it is designed for exactly people like you.