When i try to preview a report i get this error msg “The indexing 0 in the array is outside the permited range” And am returned back to the stating point.
The Qs is what might be wrong with my arrays, and how can i solve this? please assist
You may turn debug on by selecting Tools → Debugging → Active. When you run the report and the report stops, the debug window will open and show the “offending” line.
I would bet the line showed will be:
GenBusiPostingGroupTotals[Jx] := 0;
If you look at your code, you can see that you are first using the variable Jx as an array index, then assigning a value to it.
You may set in advance breakpoints into an object (provided you know which object is going to be executed and where might be the problem) by opening it in object designer and using the F9 key on the line you want the debugger stop at. You’ll need to remove the breakpoint after the debug manually, using the F9 key again.
Or you may start the debug with the option “Breakpoint at triggers” on, then, once the debug has started you may choose where set breakpoints (again using F9 key) and turn the option off.
While debug is running: F5 goes to the next breakpoint, F8 goes to next step into whatever function and whatever object, CTRL+F8 goes to the next step in the object and function you are in.
Anyway, in the case on hand you don’t need anything of the above, since with the debug active, the error message will cause the report to stop and the debugger window to open on the line which has caused the error. All the user defined variables (as jx is) will be visible, fields in record will not, but, again, you don’t need them in the case at hand.
Thanxs alot Guys. Have sorted out the issue of Array Indexing and have also known how to use the debuger. Since am new in Navision i shall continue posting more challenges.