Posted Package Table - count pkgs for ship to's on given day

johnsogjjohnsogj 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;
Sign In or Register to comment.