problems with findset

kanika
Member Posts: 247
Hi experts!!
I need to print the comment line for each sales line (quotes).
I got a funtion: funcion1() : Text[250]
with a variable: Variable1, record, sales comment line
Variable1.SETRANGE("Document Type","Sales Line"."Document Type");
Variable1.SETRANGE("No.","Sales Line"."Document No.");
Variable1.SETRANGE("Document Line No.","Sales Line"."Line No.");
IF Variable1.FINDSET THEN BEGIN
REPEAT
EXIT(Variable1.Comment);
UNTIL Variable1.NEXT = 0;
END;
In the report I have a textbox (in roundloop, body section) where SourceExpr=funcion1
But I get only the first line of comments
Please help me, thanks!!!
I need to print the comment line for each sales line (quotes).
I got a funtion: funcion1() : Text[250]
with a variable: Variable1, record, sales comment line
Variable1.SETRANGE("Document Type","Sales Line"."Document Type");
Variable1.SETRANGE("No.","Sales Line"."Document No.");
Variable1.SETRANGE("Document Line No.","Sales Line"."Line No.");
IF Variable1.FINDSET THEN BEGIN
REPEAT
EXIT(Variable1.Comment);
UNTIL Variable1.NEXT = 0;
END;
In the report I have a textbox (in roundloop, body section) where SourceExpr=funcion1
But I get only the first line of comments
Please help me, thanks!!!
0
Answers
-
You exit your function by the EXIT statement. So, for sure it will only return the first Comment."Money is likewise the greatest chance and the greatest scourge of mankind."0
-
trahk you but then.......wich statement I must use???0
-
Hi kanika
try to process your code in your head or step through it using the debugger
Then also try to understand the workings of a report: What is a dataitem, what a section, what a control. What is their function/purpose.
And just to give you some hints: Your code does not make sense. But even if it did, it would not benefit you because your approach is bound to fail.0 -
Depends on how your report should look like. Maybe you can add another DataItem of Sales Comment Line."Money is likewise the greatest chance and the greatest scourge of mankind."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