General information
Category:
Reports & Report designer
Because of the nature of each column reflecting different records and other factors this is an awkward report. I would suggest a structure with 12 memo fields per record, and 1 record per item code. Then you could loop through the shipments constructing the memo field contents. I only suggest all of this because of the report payout, which really doesn;t fit with any of the limited pardigms of the VFP report writer.
CREATE CURSOR Output_ ;
( Code N(4), ItemName C(30), Month1 M, Month2 M, ... Month12 M)
APPEND FROM Master
USE Shipment IN 0 ORDER
PRIVATE lcMemo
SELECT Output_
SCAN
SELECT Shipment
SCAN FOR Code = Output_.Code && or SEEK, SCAN WHILE
lcMemo = "month" + LTRIM( STR( MONTH( ShipDate)))
SELECT Output_
REPLACE (lcMemo) WITH &lcMemo + ;
CTOD( ShipDate) + STR( Quantity) + CHR(13) + CHR(10)
.. or whatever formatting you want
SELECT Shipment
ENDSCAN
SELECT Output_
ENDSCAN
When done, you can just create a simple report from the Output_ cursor. To eliminate unshipped products, you could REPORT FORM ... FOR NOT EMPTY( Month1) OR NOT EMPTY( Month2) OR ...
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only