The report does not show customer name. Verified on ProductCart demo store.
To fix, edit the query on line 145 (v4.1 PPE):
query="SELECT DISTINCT orders.idorder,orders.idcustomer,orders.total,orders.shipmentDetails,orders.paymentDetails,orders.taxAmount,orders.discountDetails,orders.orderDate,orders.processDate,orders.shipDate,customers.name,customers.lastName FROM ((ProductsOrdered INNER JOIN Orders ON ProductsOrdered.idOrder=Orders.idOrder) INNER JOIN customers on customers.idcustomer=orders.idcustomer) INNER JOIN Categories_Products ON ProductsOrdered.idProduct=Categories_Products.idProduct WHERE Categories_Products.IDCategory=" & pIDCategory & " AND ((orders.orderStatus>2 AND orders.orderStatus<5) OR (orders.orderStatus>6 AND orders.orderStatus<9) OR (orders.orderStatus=10 OR orders.orderStatus=12)) " & TempSQL1 & TempSQL2 & TempSpecial & " ORDER BY " & tmpD & " DESC;"
This stuff was added:
,customers.name,customers.lastName FROM ((ProductsOrdered INNER JOIN Orders ON ProductsOrdered.idOrder=Orders.idOrder) INNER JOIN customers on customers.idcustomer=orders.idcustomer)
So it will pull customers.name and customers.lastName from the database.
Then on line 189:
do until rs.EOF
pc_idorder=rs("idorder")
pc_idcustomer=rs("idcustomer")
pc_orderDate=rs("orderDate")
custName=rs("name") & " " & rs("lastName")
This grabs the database query info and puts it into a variable custName
Then on line 259:
<td nowrap><a href="viewCustOrders.asp?idcustomer=<%=pc_idcustomer%>" title="View all orders by this customer"><%=custName%></a></td>
This shows the previously defined custName variable.
|