How to only display SINGLE LINE sales orders on a report

johnsogj
Member Posts: 103
Hello, I'm creating a pick list from the "Warehouse Activity Line" table and I only want to include SINGLE LINE sales orders. So basically, the report should look in the "warehouse activity line" table and before it writes a record it should check to see if there are any other detail lines for the same sales order in the table. if there are not, it should print that line (so that it can be picked). If there are additional detail lines for that same sales order, then no lines for the order should be printed.
can anyone help?
can anyone help?
0
Comments
-
trying to understand but it's not easy by your desription
but
if i only wanted the first line i would filter on line no 100000 -
Try the effect of SalesLine.COUNT = 1 & see if it achieves your purpose.NAV - Norton Anti Virus
ERP Consultant (not just Navision) & Navision challenger0 -
how would the code look to only count specific records in a table? I understand how to use COUNT to count all records in a table, but how do you write the code to count the number of records in the warehouse activity line that have the same value in the "Source No." field as the current record?
thanks for your help. I think this just may work.0 -
harry - the reason I cant filter for only records where line = 1.000 is because then I would still be printing line #1 for a multi-line sales order. I only want to print lines for sales orders that have ONLY 1 line. if an order has more than one line I want to skip the entire order.0
-
Savatage wrote:trying to understand but it's not easy by your desription
but
if i only wanted the first line i would filter on line no 10000
Try the following:
The least & ugly coding (there might exist a function somewhere in some obscure codeunit that returns the number of sales lines...):
SalesLine.SETRANGE ("Document No.", "Source No.");
IF SalesLine.FINDFIRST AND (SalesLine.COUNT = 1) THEN .....
Also explore SalesLine.NEXT...NAV - Norton Anti Virus
ERP Consultant (not just Navision) & Navision challenger0
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