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

thanks, this routines looks useful and shorter then mine, I will try it
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform