Information générale
Catégorie:
Gestionnaire de rapports & Rapports
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 ...
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement