The indexing in the array is outside of the permitted range

PaLPiTaTioNPaLPiTaTioN Member Posts: 55
edited 2008-12-05 in Navision Attain
I declared an array of text with dimension 1. I want to store 30 values, but when I run my report, I get this error:

The indexing <num> in the array is outside of the permitted range,

where <num> was 23, and after deleting 23 it was 22, and after deleting 21..30 it was 12, and after changing some code it became 2. Does anyone what this error exactly says and how I should prevent it?

Comments

  • PaLPiTaTioNPaLPiTaTioN Member Posts: 55
    problem solved: I had to set dimenstion to 30, instead of 1 :). Thanks to the great Navision Help that should have a topic about it ;)
  • emulsifiedemulsified Member Posts: 139
    I am running a report which ITERATES by using Integer - Print Loop DataItem. The Max Iteration property on the report was set to 99 but I want it to be maximum 500 so I changed it. The report normally lets me select how many Top customers to return with the Max being 99, I wanted up to 500 so I changed all instances of Max iteration 99 to Max iteration 500.

    Now I get the following error when I choose any number over 99:

    :!: The indexing 101 in the array is outside of the permitted range.

    What do I need to add or change? I saw the response to this original post but do not understand dimension? What do I change or add and where?
    Half-empy or half-full how do you view your database?

    Thanks.
  • DenSterDenSter Member Posts: 8,307
    That refers to the Dimensions property of the variable in question, which determines whether the variable is an array, and that property defines the maximum number of elements in the array. You set the max iterations of a dataitem to 500, but you're also going to need to modify the dimensions property accordingly. I don't know though if 500 is an accepted value, so make sure you test that.
  • emulsifiedemulsified Member Posts: 139
    It works. I set all instances of Max Iteration to 500 for the loops and set the dimension values to 500 for each array variable I am using.

    FYI for anyone who does not know - You can set the dimension of an array variable by viewing C/AL Globals selecting your variable and pressing SHIFT+F4. Since it was hard to find this answer for myself.

    Works perfectly now!
    Half-empy or half-full how do you view your database?

    Thanks.
Sign In or Register to comment.