vSQL = String.Format("SELECT T.CUS_NAME,T.ITEM_NO,T.WIDTH,T.LENGTH,T.TOTAL,ROUND((TO_NUMBER(T.WIDTH)/12)*TO_NUMBER(T.LENGTH)*T.TOTAL*2,2) AS FT,A.ADDRESS,A.TEL FROM ETERNALM.TEMGDEL01 T,ETERNALM.CUSTOMER_M A WHERE T.DEL_DATE='{0}' AND T.CUS_NO='{1}' AND T.CUS_NO=A.CUS_NO ORDER BY T.ITEM_NO,TO_NUMBER(T.WIDTH),TO_NUMBER(T.LENGTH),T.TOTAL",
Me.txt_DEL_DATE10.Text.Trim, vRow.Item(0).ToString)
vDT = Nothing
vDT = objSCH.ANYTABLE_BYANY(vSQL)
If vDT.Rows.Count > 0 Then
getJJCHD(vDT) ‘这个函数作用是把数据格式化写入页面。
End If
PrintAllJJCHD()‘这个设置打印。
Next
……
Private Sub PrintAllJJCHD()
Try
'If fSpread8.Sheets.Count = 0 Then
' MsgBox("請先導出資料再列印")
' Exit Sub
'End If
Dim printset As New FarPoint.Win.Spread.PrintInfo()
Dim printmar As New FarPoint.Win.Spread.PrintMargin