Posted Package Table - count pkgs for ship to's on given day
johnsogj
Member Posts: 103
Hello, I'm running a report off of the posted pkg table. I use "Posting Date" as a report filter. I want to count/display the number of packages for each "ship to" on a given "Posting Date". I have tried the following code, but I am only able to display the number of packages for the first Ship To the report comes across. (There are 14 total packages on posting date 9/4/07. 11 for ship to "A", 3 for ship to "B". The report only displays the information for ship to "A".) any ideas how I can get the report to keep processing to find the additional set of records associated with other ship to's?? Its like I need the report to loop somehow.
PostedPkg.RESET;
PostedPkg.SETCURRENTKEY("Posting Date","Ship-to No.");
PostedPkg.SETRANGE("Posting Date","Posting Date");
PostedPkg.SETRANGE("Ship-to No.", "Ship-to No.");
IF PostedPkg.FINDSET THEN
TotalInvoices := PostedPkg.COUNT;
PostedPkg.RESET;
PostedPkg.SETCURRENTKEY("Posting Date","Ship-to No.");
PostedPkg.SETRANGE("Posting Date","Posting Date");
PostedPkg.SETRANGE("Ship-to No.", "Ship-to No.");
IF PostedPkg.FINDSET THEN
TotalInvoices := PostedPkg.COUNT;
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
- 322 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