Hi all
i want to fetch the "No. 2" field from Item table into an array under "Transfer Shipment Report", so i have written the following code to do so but not able to fix it,
globals i have used:
i->Int
TransShipLine->Rec->Transfer Shipment Line
ItemRec->Record->Item
ItemNo->Text array
i:=1;
IF TransShipLine.FINDSET THEN
REPEAT
ItemRec.GET("Item No.");
ItemNo:=ItemRec."No. 2";
i+=1;
UNTIL TransShipLine.NEXT=0;
here the dimension of the array is 6 and when i am running the report am getting an error
"The indexing 7 in the array is outside of the permitted range"
what is wrong with the code. can anybody help me
0
Answers
Dimension of the array is 6 but TransShipLine.FINDSET finds more than that so you are facing the error.
You've solved your own problem. You know that your array can only hold six values, but you are trying to assign something in the 7th spot. That 7th spot doesn't exist so the error is thrown.
Either increase the size of your array or add conditions to your REPEAT..UNTIL loop to account for finding more than you need.
My Blog - nav.education
"The indexing n+1 in the array is outside of the permitted range". I think there is some problem with filtering
"The indexing n+1 in the array is outside of the permitted range". I think there is some problem with filtering
My Blog - nav.education
That was my mistake, i have correct it in the next post
Can u please focus on this. should i use Integer table, if yes then how
there needs to be filters on transShipLine to findset for the specific rec
also
ItemRec.GET("Item No.");
should be
ItemRec.GET(TransShipLine."Item No.");
Steve Post
thanx, i got it and the problem is resolved