Hello~ "eromein", can I ask u one more question?

atre
Member Posts: 39
Hi eromein,
First of all, thank you very much for reply me about "how to SKIP the BLANK page" topic!
according to your advise, I do much much research about the "Navision standard invoice report" (No.206) these days, and I think (or I guess) it is the following codes that make the report work perfectly :
one is :
--"COPYLOOP" "OnAfterGetRecord" trigger --
IF Number > 1 THEN
COPYtEXT := TEXT003;
CurrReport.PageNo :=1; // reset the PAGENO for every NEW GROUP"
My question for it is:
1. When will the IF LOOP above BEGIN? "When" will "Number"
become greater than 1 (Number >1) :-k
the other is :
--"Sales Invoice Line" "OnPreDataItem" trigger--
MoreLines :=FIND('+');
......
WHILE MoreLines AND (Description ='') AND ("No." ='') AND (Quantity =0) AND (Amout =0) DO
MoreLines := NEXT(-1) <>0;
IF NOT MoreLines THEN
CurrReport.BREAK; //Beark when there is no more invoice lines
My question is:
1. What is the code's purpose or what does it mean??? :-k
"MoreLines := NEXT(-1) <>0;"
hope that it is convenient for you to take a look and reply me, THANK YOU~
First of all, thank you very much for reply me about "how to SKIP the BLANK page" topic!

according to your advise, I do much much research about the "Navision standard invoice report" (No.206) these days, and I think (or I guess) it is the following codes that make the report work perfectly :
one is :
--"COPYLOOP" "OnAfterGetRecord" trigger --
IF Number > 1 THEN
COPYtEXT := TEXT003;
CurrReport.PageNo :=1; // reset the PAGENO for every NEW GROUP"
My question for it is:
1. When will the IF LOOP above BEGIN? "When" will "Number"
become greater than 1 (Number >1) :-k
the other is :
--"Sales Invoice Line" "OnPreDataItem" trigger--
MoreLines :=FIND('+');
......
WHILE MoreLines AND (Description ='') AND ("No." ='') AND (Quantity =0) AND (Amout =0) DO
MoreLines := NEXT(-1) <>0;
IF NOT MoreLines THEN
CurrReport.BREAK; //Beark when there is no more invoice lines
My question is:
1. What is the code's purpose or what does it mean??? :-k
"MoreLines := NEXT(-1) <>0;"
hope that it is convenient for you to take a look and reply me, THANK YOU~

0
Comments
-
WHILE MoreLines AND (Description ='') AND ("No." ='') AND (Quantity =0) AND (Amout =0) DO
MoreLines := NEXT(-1) <>0;
this code will get the last line in the sales line where there is a description and a no and a quantity and an amount <> 0.Rgds
Benny Giebens0
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