Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Adding quantity in free table
Message
From
19/12/2006 09:15:44
 
 
To
19/12/2006 09:06:23
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01178051
Message ID:
01178839
Views:
18
Please, explain what exactly is wrong. Also, you don't need in SCAN, you get cursor by SQL, right away.
Btw, do you use VFP6?

>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
>
Edward Pikman
Independent Consultant
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform