For Each pd As String In pds '分产品打印
If tbl.Filter > "" Then
drs = tbl.DataTable.Select("订单编号 = '" & pd & "' And " & tbl.Filter)
Else
drs = tbl.DataTable.Select("订单编号 = '" & pd & "'")
End If
dim kkk as integer = 1
For Each dr As DataRow In drs '逐行打印此产品的订单
cnt = rt.Rows.Count
For r As Integer = p * prs To math.min(rt.Rows.Count - 1, ( p + 1) * prs - 1)
'For c As Integer = 0 To tbl.Cols.Count - 1
rt.Cells(cnt, 0).Text = kkk
rt.Cells(cnt, 1).Text = dr("名称")
rt.Cells(cnt, 2).Text = dr("规格")
rt.Cells(cnt, 3).Text = dr("数量")
rt.Cells(cnt, 4).Text = dr("面积")
rt.Cells(cnt, 5).Text = dr("单价")
rt.Cells(cnt, 6).Text = dr("金额")
rt.Cells(cnt, 7).Text = dr("加工要求")
Next
kkk += 1
Next