Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Adding quantity in free table
Message
From
19/12/2006 09:50:01
 
 
To
19/12/2006 09:15:44
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01178051
Message ID:
01178846
Views:
12
Hi Ed,

Here is my complete code. Please advice. Thanks, Sam
* Start PO Entry Table Query here...
* Get the information here...
StartDate = ctod(THISFORM.txtStartDate.Value)
EndDate = ctod(THISFORM.txtEndDate.Value)
Vendor = THISFORM.txtVendorID.Value
Tolerance = val(THISFORM.txtTolerance.Value)
ReptSum = THISFORM.optReportType.optSummary.Value = 1

if EMPTY(THISFORM.txtTolerance.Value)
  MessageBox("Please enter the number for days Tolerance!", 64)
else
  OPEN DATABASE maxdata
	
  SELECT 0
  USE OrderMaster
  INDEX ON ORDNUM_10 TAG ordnum_10
	
  * Get the PO Entry...
  if EMPTY(Vendor)
    ReptSum = .T.
    SELECT * FROM PoEntry ;
    WHERE daterecv BETWEEN StartDate AND EndDate ;
    ORDER BY vendorname, daterecv ;
    INTO CURSOR PoOrders
  else
    SELECT * FROM PoEntry ;
    WHERE daterecv BETWEEN StartDate AND EndDate AND VendorID = '&Vendor' ;
    ORDER BY daterecv ;
    INTO CURSOR PoOrders
  endif
	
  * 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 AS VenName, ;
    cnt(*) AS NumReceipts, ;
    SUM(qtyrecv) AS QtyRecv, ;
    SUM(qtyrej) AS QtyRej, ;
    ROUND(QtyRej/QtyRecv*100,2) as PerRej ;
  FROM PoEntry GROUP BY 1 ;
  WHERE daterecv BETWEEN StartDate AND EndDate ;
  INTO CURSOR VndrPerf	
	
  SELECT VndrPerf
  if reccount() = 0
    MessageBox("No Records to Display!",64)
  else
    VpStartDate = StartDate
    VpEndDate = EndDate
    VpTolerance = Tolerance
    REPORT FORM VendorPerf PREVIEW
  endif
endif
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform