Dynamic Array!!!

lilianatavares
Member Posts: 39
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
:?
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
-
through some temporary table that have primary key field of type integer and some field of type text. Fill this temporary table and print as if you have other tables.... 8)0
-
Why would you want to fill an array with the values of a customer recordset that you have ready to be used in your report? All you need to do to display your customer information is put the fields on a section and you're done. If you don't want all of them according to certain restrictions, you program that condition in the OnAfterGetRecord and do a CurrReport.SKIP if the record does not meet the condition. I think you are thinking a little too complicated there.
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.0 -
Another example:
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 balance0 -
OR: you add the standard Navision Balance field that is in the customer table to your customer dataitem. Maybe you need a CALCFIELD in the OnAfterGetRecord trigger of the customer dataitem, but you are thinking WAY too complicated. If you need detailed information (like all the amounts of the customer ledger entries), you should just add and indent a customer ledger entry dataitem and link it to your customer.
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.0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions