Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Cross Tab Reports?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00002310
Message ID:
00002600
Vues:
29
Steve the following is an example, using tastrade tables, of
vfpxtab. You can copy it from here and runit in vfp.

Let me know if this is along the lines of what you need to do.

Chris

* Create a table for listing the periods to be cross tabulated
*)(In this case months.)
DIMENSION laFields[2,4]
laFields[1,1] = "nMonth"
laFields[1,2] = "N"
laFields[1,3] = 2
laFields[1,4] = 0

laFields[2,1] = "cMonth"
laFields[2,2] = "C"
laFields[2,3] = 10
laFields[2,4] = 0

CREATE TABLE period FROM ARRAY laFields


FOR lnMonth = 1 TO 12
INSERT ;
INTO period ;
(nMonth,cMonth) ;
VALUES ;
(lnMonth, CMONTH(CTOD(STR(lnMonth)+"/01/96")) )
ENDFOR


* Create a table (cursor) with one record for each customer month
*)combination.
SELECT a.Customer_id, c.nMonth, ;
(b.Unit_price * b.Quantity) AS NetOrder ;
FROM \vfp\samples\mainsamp\data\tastrade!orders a,
Chris
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform