Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Cross tabulate report
Message
De
13/05/1997 14:20:35
 
 
À
13/05/1997 11:11:54
Vinod Parwani
United Creations L.L.C.
Ad-Dulayl, Jordanie
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Divers
Thread ID:
00031927
Message ID:
00032021
Vues:
52
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
Fil
Voir

Click here to load this message in the networking platform