Does dynamic array exist in Navision?
Do they know how to implement?
I want to do a cycle repeat until to fill an array with customers and to show in a report. I know that other solution exists.
For example
aux:=10000..80000;
customer.SETFILTER(customer "no.",aux);
IF customer.FIND (' - ' )THEN
REPEAT
BEGIN
cust:=customer.name;
i:=i+1;
END;
UNTIL customer.NEXT=0
And in the report I want to show the cust values.
How do I can you make it?
Thank you
:?
0
Comments
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
By the way, you don't need the BEGIN and END inside the REPEAT UNTIL loop. I always put those outside the REPEAT loop, just in case I want to do something outside the loop but inside the condition.
RIS Plus, LLC
aux := 10000 ..80000;
customer.SETFILTER(customer. no. " ,aux);
IF customer.FIND (' - ' )THEN
REPEAT
" Detail Cust. ledg. Entry ".SETFILTER (" Detail Cust. ledg. Entry "."Customer no. " ,aux);
IF " Detail Cust. ledg. Entry ".FIND (' - ' )THEN
REPEAT
aux := " Detail Cust. ledg. Entry " .amount;
i:=i+1;
UNTIL " Detail Cust. ledg. Entry ".NEXT=0;
UNTIL customer.NEXT=0;
This code is written in the customer body.
And to print in the report the different lines.
one for the customer 10000 and the balance
one for the customer 20000 and the balance
....
one for the customer 80000 and the balance
By the way, I hope you are not programming this in any of the section triggers, that is NOT the place to put this code. If you insist on doing it that way, you should write all of that code in the OnAfterGetRecord trigger.
RIS Plus, LLC