colspan="4" colspan="3" style="text-align:center; border-bottom: solid 1px DarkGray;" >Variance
Order
Date
PO
No.Order
No.
Invoice 
Date
Invoice
No.
Ship
Date
Item Code
(Dist Sku)
Product Description Order
Qty
Ship
Qty
Qty Weight Dollars Comm
SELECT SUM(Quantity-QtyShipped) as OrderQty, SUM(quantity) as ShipQty, SUM(QtyShipped) as VarQty, SUM(varWt) as varWt, SUM(varAmt) as varAmt, SUM(varComm) as varComm, SUM(1) As Cnt FROM qcf_orderDetail WHERE #_outerGroupID # = #_curOuterGroupID # AND #_innerGroupID# = #_curInnerGroupID# SELECT SUM(Quantity-QtyShipped) as OrderQty, SUM(quantity) as ShipQty, SUM(QtyShipped) as VarQty, SUM(varWt) as varWt, SUM(varAmt) as varAmt, SUM(varComm) as varComm, SUM(1) as Cnt FROM qcf_orderDetail WHERE #_outerGroupID # = #_curOuterGroupID # SELECT COUNT(*) cnt FROM qcf_orderDetail WHERE #_outerGroupID # = #_curOuterGroupID # GROUP BY #_outerGroupFieldName#, #_innerGroupFieldName#
 
#evaluate("#_outerGroupFieldName#")#
#evaluate("#_innerGroupFieldName#")#
#fixLongStr(htmleditformat(DateFormat(qcf_orderDetail.OrderDate, 'mm/dd/yy')),8,"tr")# #_ShowNum# #htmleditformat(DateFormat(qcf_orderDetail.InvoiceDateRaw, 'mm/dd/yy'))# #fixLongStr(htmleditformat(qcf_orderDetail.InvoiceNumber),15,"br")# #htmleditformat(DateFormat(qcf_orderDetail.ScheduledShipDateRaw, 'mm/dd/yy'))# #fixLongStr(htmleditformat(qcf_orderDetail.ItemCode),15,"br")#
#fixLongStr(htmleditformat(qcf_orderDetail.DistributorItemCode),15,"br")#
#fixLongStr(htmleditformat(qcf_orderDetail.CategoryDescription),50,"tr")# #htmleditformat(qcf_orderDetail.Description)# (#Trim(htmleditformat(qcf_orderDetail.PackDesc))#) #htmleditformat(qcf_orderDetail.Quantity-qcf_orderDetail.QtyShipped)# #htmleditformat(qcf_orderDetail.Quantity)# #htmleditformat(qcf_orderDetail.QtyShipped)# #_VarWt# #htmleditformat(NumberFormat(qcf_orderDetail.varAmt,"99,999.99"))# #htmleditformat(NumberFormat(qcf_orderDetail.varComm, "99,999.99"))#
#evaluate("#_innerGroupFieldName#")# Totals: #numberformat(innerTotals.OrderQty,"999,999,999")# #numberformat(innerTotals.ShipQty,"999,999,999")# #numberformat(innerTotals.VarQty,"999,999,999")# #numberformat(innerTotals.VarWt,"999,999,999")# #numberformat(innerTotals.VarAmt,"999,999,999.99")# #numberformat(innerTotals.VarComm,"999,999,999.99")#
 
#evaluate("#_outerGroupFieldName#")# Totals: #numberformat(outerTotals.OrderQty,"999,999,999")# #numberformat(outerTotals.ShipQty,"999,999,999")# #numberformat(outerTotals.VarQty,"999,999,999")# #numberformat(outerTotals.VarWt,"999,999,999")# #numberformat(outerTotals.VarAmt,"999,999,999.99")# #numberformat(outerTotals.VarComm,"999,999,999.99")#
SELECT SUM(Quantity-QtyShipped) as OrderQty, SUM(quantity) as ShipQty, SUM(QtyShipped) as VarQty, SUM(varWt) as varWt, SUM(varAmt) as varAmt, SUM(varComm) as varComm FROM qcf_orderDetail
 
 
Overall Totals:   Qrder Qty Ship Qty Qty Weight Dollars Comm 
#numberformat(grandTotals.OrderQty,"999,999,999")# #numberformat(grandTotals.ShipQty,"999,999,999")# #numberformat(grandTotals.VarQty,"999,999,999")# #numberformat(grandTotals.VarWt,"999,999,999")# #numberformat(grandTotals.VarAmt,"999,999,999.99")# #numberformat(grandTotals.VarComm,"999,999,999.99")# 
#mid(myString,maxLen+1,len(myString))#">