set rsOrders = Server.CreateObject("ADODB.Recordset")
rsOrders.Open "SELECT * From oitems INNER JOIN orders ON oitems.orderid = orders.orderid Where orders.orderid=" & order, Conn
While Not rsOrders.Eof
ccode = rsOrders("catalogid")
numitems = rsOrders("numitems")
itemname = Replace(rsOrders("itemname"),"<br />"," - ")
pdf.Cell(5)
pdf.Cell -1,0,Cstr(numitems),0,1,"C"
pdf.Cell(15)
pdf.Cell 0,0,Left(itemname,120),0,1,"L"
pdf.Ln(6)
rsOrders.MoveNext
pdf.Close()
pdf.Output ("D:\testshop_orders\pakbon_" & invoiceid & ".pdf")
Wend
|