Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Adding quantity in free table
Message
De
19/12/2006 09:06:23
 
 
À
15/12/2006 14:16:14
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01178051
Message ID:
01178838
Vues:
17
Hi Ed,

I have put in the code that you gave me as shown below and somehow I am not getting the right data in my report. I have added the "INTO CURSOR PoOrders" as well. Please advice.
* Create VendorPerformance cursor to hold the report...
CREATE CURSOR VndrPerf(VendorID C(5), VenName C(25), NumReceipts I, QtyRecv N(10), ;
		QtyRej N(6), PerRej B(2), OnTime B(2))
		
SELECT vendorID, vendorname, ;
	cnt(*) AS NumReceipts, ;
	SUM(qtyrecv) AS qtyrecv, ;
	SUM(qtyrej) AS qtyrej, ;
	ROUND(100*SUM(qtyrej)/SUM(qtyrecv),2) AS PerRej ;
FROM PoEntry GROUP BY 1 ;
INTO CURSOR PoOrders
	
Scan
  INSERT INTO VndrPerf(VendorID, VenName, NumReceipts, QtyRecv, QtyRej, PerRej, OnTime) ;
  VALUES (PoOrders.VendorID, PoOrders.VendorName, PoOrders.NumReceipts, PoOrders.QtyRecv, ;
	PoOrders.QtyRej, PoOrders.PerRej,0)
EndScan
Select vendorid,vendorname,cnt() as vendorcnt,sum(qtyrecv) as qtyrecv, ;
sum(qtyrej) as qtyrej,round(100*sum(qtyrej)/sum(qtyrecv),2) as perrej ;
from rejects group by 1
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform