If CurrentTable.name.contains("开料单")
Dim Doc As new PrintDoc
doc.PageSetting.Width =
210 '纸张宽度为100毫米
doc.PageSetting.Height
= 297 '纸张高度为120毫米
Doc.PageSetting.LeftMargin
= 2.5 '设置左边距
Doc.PageSetting.RightMargin
= 2.5 '设置右边距
Doc.PageSetting.TopMargin
= 2.5 '设置上边距
Doc.PageSetting.BottomMargin
= 2.5 '设置下边距
Dim img As prt.RenderImage
Dim Bar As New BarCodeBuilder
Dim ra As New prt.RenderArea '定义一个容器
Dim rt As prt.RenderText '定义一个文本对象
Dim re As New prt.RenderTable()
Dim tt As New List(Of String)
Dim ty As String
tt.add("物料号")
tt.add("piao号")
tt.add("订单号")
tt.add("任务单条数")
tt.add("已开料条数")
tt.add("未开料条数")
tt.add("铣端头确认")
tt.add("插接口确认")
tt.add("冲缺口确认")
tt.add("净重(KG)")
tt.add("单弧数量")
tt.add("双弧数量")
'--------------------初始化
Dim name As
String = CurrentTable.name
Dim ut As
String
If name =
"直身开料单"
ut =
"直身出货数量"
Else If name
= "弯头开料单"
ut =
"弯头出货数量"
Else If name
="珠江直身开料单"
ut =
"珠江直身出货数量"
Else If name
= "珠江弯头开料单"
ut = "珠江弯头出货数量"
End If
'-------------判断原表类型
Dim pn() As String =
DataTables(ut).GetComboListString("生产piao号").Split("|")
For s As Integer = 1 To pn.length
Select Case name
'-------------直身单的情况
Case "直身开料单"
ra = new prt.RenderArea
ra.SplitVertBehavior =
prt.SplitBehaviorEnum.Never
ra.Width = "Parent.Width"
ra.Height = 297/2
'---------单张表大小
Bar = New BarCodeBuilder
Bar.Symbology = Barpro.Symbology.QRCode
Bar.Code = pn(s-1)
Bar.QuietZoneWidth = 2
Bar.QRCodeErrorCorrectionLevel = Barpro.QRCodeErrorCorrectionLevel.H
Bar.QRCodeModuleSize = 1
img = new prt.RenderImage
img.Image = bar.GetImage
img.x =180
img.y=3
ra.children.add(img)
'---------------二维码
rt = new prt.RenderText
rt.Style.TextAlignHorz = prt.AlignHorzEnum.Center
rt.text = "铜/铝巴加工状态表"
rt.Style.Font = New Font("黑体", 30, FontStyle.Bold)
rt.y = 1
ra.children.add(rt)
'---------------标题
rt = new prt.RenderText
rt.text = "直身"
rt.Style.Font = New Font("黑体",
25)
rt.x = 140
rt.y = 15
ra.children.add(rt)
'----------------类型
rt = new prt.RenderText
rt.text = "1,开料人员必须确认最终加工工序,不需要的工序用'"
& "\" & "'划掉"
rt.Style.Font = New Font("黑体",
12)
rt.x = 2
rt.y = 15
ra.children.add(rt)
rt = new prt.RenderText
rt.text = "2,每个工序加工完后,必须打'"
& "√" & "'确认"
rt.Style.Font = New Font("黑体",
12)
rt.x = 2
rt.y = 20
ra.children.add(rt)
rt = new prt.RenderText
rt.text = "3,出货时,跟单员确认各个工序是否加工完,未加工完的不能出货"
rt.Style.Font = New Font("黑体",
12)
rt.x = 2
rt.y = 25
ra.children.add(rt)
'----------------加入表格
re = New prt.RenderTable()
re.x = 2
re.y = 30
re.Style.GridLines.All = New
prt.Linedef
re.Style.TextAlignHorz =
prt.AlignHorzEnum.center
re.Style.TextAlignVert =
prt.AlignVertEnum.center
re.Width = "Auto"
re.Cols(0).Width = 47
re.Cols(1).Width = 33
re.Cols(2).Width = 22
re.Cols(3).Width = 12
re.Cols(4).Width = 12
re.Cols(5).Width = 12
re.Cols(6).Width = 7
re.Cols(7).Width = 7
re.Cols(8).Width = 7
re.Cols(9).Width = 15
re.Cols(10).Width = 12
re.Cols(11).Width = 12
re.Style.Font = New Font("黑体",
15, FontStyle.Bold)
'-------------------------------------------表格样式设置
For c As Integer = 0 To 11
rt = new prt.RenderText
rt.Text = tt(c)
re.Cells(0,c).RenderObject
= rt
Next
For r As Integer = 1 To
Tables(ut).rows.count
If pn(s-1) = Tables(ut).rows(r-1)("生产piao号")
'-----------------
rt = new prt.RenderText
rt.text =
Tables(ut).rows(r-1)("型号")
re.cells(r,0).RenderObject = rt
rt = new prt.RenderText
rt.text =
Tables(ut).rows(r-1)("生产piao号")
re.cells(r,1).RenderObject = rt
rt = new prt.RenderText
rt.text =
Tables(ut).rows(r-1)("订单号")
re.cells(r,2).RenderObject = rt
rt = new prt.RenderText
rt.text =
Tables(ut).rows(r-1)("数量")
re.cells(r,3).RenderObject = rt
If
Tables(ut).rows(r-1)("单条单弧") = 0
Else
rt = new
prt.RenderText
rt.text =
Tables(ut).rows(r-1)("单条单弧")
re.cells(r,10).RenderObject = rt
End If
If
Tables(ut).rows(r-1)("单条双弧") = 0
Else
rt = new
prt.RenderText
rt.text =
Tables(ut).rows(r-1)("单条双弧")
re.cells(r,11).RenderObject = rt
End If
End If
Next
ra.children.add(re)
ty = DataTables(name).GetComboListString("铣端头or打毛刺","[生产piao号]
=" & pn(s-1))
rt = new prt.RenderText
rt.text = "工序:" &
ty
rt.x =2
rt.y = 120
rt.Style.Font = New Font("黑体",
30, FontStyle.Bold)
ra.children.add(rt)
rt = new prt.RenderText
rt.text = "开料人:____________"
rt.x = 2
rt.y = 140
rt.Style.Font = New Font("黑体",
12, FontStyle.Bold)
ra.children.add(rt)
rt = new prt.RenderText
rt.text = "条数核对:____________"
rt.x = 210/2 -20
rt.y = 140
rt.Style.Font = New Font("黑体",
12, FontStyle.Bold)
ra.children.add(rt)
rt = new prt.RenderText
rt.text = "总净重:____________"
rt.x = 210 -40
rt.y = 140
rt.Style.Font = New Font("黑体",
12, FontStyle.Bold)
ra.children.add(rt)
doc.body.children.add(ra)
'---------------------上半张
Dim Line As New
prt.LineDef(2,Color.Black, DashStyle.Dot)
Dim ln As New
prt.RenderLine(2,297/2, 208, 297/2, Line)
doc.body.children.add(ln)
'---------------------------
ra = new prt.RenderArea
ra.Width = "Parent.Width"
ra.Height = 297/2 - 3
ra.y = 297 / 2
'---------单张表大小
Bar = New BarCodeBuilder
Bar.Symbology =
Barpro.Symbology.QRCode
Bar.Code = pn(s-1)
Bar.QuietZoneWidth = 2
Bar.QRCodeErrorCorrectionLevel
= Barpro.QRCodeErrorCorrectionLevel.H
Bar.QRCodeModuleSize = 1
img = new prt.RenderImage
img.Image = bar.GetImage
img.x =180
img.y=3
ra.children.add(img)
rt = new prt.RenderText
rt.Style.TextAlignHorz =
prt.AlignHorzEnum.Center
rt.text = "铜/铝巴加工状态表"
rt.Style.Font = New Font("黑体",
30, FontStyle.Bold)
rt.y = 1
ra.children.add(rt)
'---------------标题
rt = new prt.RenderText
rt.text = "直身"
rt.Style.Font = New Font("黑体",
25)
rt.x = 140
rt.y = 15
ra.children.add(rt)
'----------------类型
rt = new prt.RenderText
rt.text = "1,开料人员必须确认最终加工工序,不需要的工序用'"
& "\" & "'划掉"
rt.Style.Font = New Font("黑体",
12)
rt.x = 2
rt.y = 15
ra.children.add(rt)
rt = new prt.RenderText
rt.text = "2,每个工序加工完后,必须打'"
& "√" & "'确认"
rt.Style.Font = New Font("黑体",
12)
rt.x = 2
rt.y = 20
ra.children.add(rt)
rt = new prt.RenderText
rt.text = "3,出货时,跟单员确认各个工序是否加工完,未加工完的不能出货"
rt.Style.Font = New Font("黑体",
12)
rt.x = 2
rt.y = 25
ra.children.add(rt)
'----------------加入表格
re = New prt.RenderTable()
re.x = 2
re.y = 30
re.Style.GridLines.All = New
prt.Linedef
re.Style.TextAlignHorz =
prt.AlignHorzEnum.center
re.Style.TextAlignVert =
prt.AlignVertEnum.center
re.Width = "Auto"
re.Cols(0).Width = 47
re.Cols(1).Width = 33
re.Cols(2).Width = 22
re.Cols(3).Width = 12
re.Cols(4).Width = 12
re.Cols(5).Width = 12
re.Cols(6).Width = 7
re.Cols(7).Width = 7
re.Cols(8).Width = 7
re.Cols(9).Width = 15
re.Cols(10).Width = 12
re.Cols(11).Width = 12
re.Style.Font = New Font("黑体",
15, FontStyle.Bold)
'-------------------------------------------表格样式设置
For c As Integer = 0 To 11
rt = new prt.RenderText
rt.Text = tt(c)
re.Cells(0,c).RenderObject
= rt
Next
For r As Integer = 1 To
Tables(ut).rows.count
If pn(s-1) =
Tables(ut).rows(r-1)("生产piao号")
'-----------------
rt = new prt.RenderText
rt.text =
Tables(ut).rows(r-1)("型号")
re.cells(r,0).RenderObject = rt
rt = new prt.RenderText
rt.text =
Tables(ut).rows(r-1)("生产piao号")
re.cells(r,1).RenderObject = rt
rt = new prt.RenderText
rt.text =
Tables(ut).rows(r-1)("订单号")
re.cells(r,2).RenderObject = rt
rt = new prt.RenderText
rt.text =
Tables(ut).rows(r-1)("数量")
re.cells(r,3).RenderObject = rt
If
Tables(ut).rows(r-1)("单条单弧") = 0
Else
rt = new
prt.RenderText
rt.text =
Tables(ut).rows(r-1)("单条单弧")
re.cells(r,10).RenderObject = rt
End If
If Tables(ut).rows(r-1)("单条双弧")
= 0
Else
rt = new
prt.RenderText
rt.text =
Tables(ut).rows(r-1)("单条双弧")
re.cells(r,11).RenderObject = rt
End If
End If
Next
ra.children.add(re)
ty = DataTables(name).GetComboListString("铣端头or打毛刺","[生产piao号]
=" & pn(s-1))
rt = new prt.RenderText
rt.text = "工序:" &
ty
rt.x =2
rt.y = 120
rt.Style.Font = New Font("黑体",
30, FontStyle.Bold)
ra.children.add(rt)
rt = new prt.RenderText
rt.text = "开料人:____________"
rt.x = 2
rt.y = 138
rt.Style.Font = New Font("黑体",
12, FontStyle.Bold)
ra.children.add(rt)
rt = new prt.RenderText
rt.text = "条数核对:____________"
rt.x = 210/2 -20
rt.y = 138
rt.Style.Font = New Font("黑体",
12, FontStyle.Bold)
ra.children.add(rt)
rt = new prt.RenderText
rt.text = "总净重:____________"
rt.x = 210 -40
rt.y = 138
rt.Style.Font = New Font("黑体",
12, FontStyle.Bold)
ra.children.add(rt)
doc.body.children.add(ra)
'------------------------------------------------------------弯头
Case "弯头开料单"
ra = new prt.RenderArea
ra.SplitVertBehavior =
prt.SplitBehaviorEnum.Never
ra.Width =
"Parent.Width"
ra.Height = 297/2
'---------单张表大小
Bar = New BarCodeBuilder
Bar.Symbology =
Barpro.Symbology.QRCode
Bar.Code = pn(s-1)
Bar.QuietZoneWidth = 2
Bar.QRCodeErrorCorrectionLevel
= Barpro.QRCodeErrorCorrectionLevel.H
Bar.QRCodeModuleSize = 1
img = new prt.RenderImage
img.Image = bar.GetImage
img.x =180
img.y=3
ra.children.add(img)
'-----------piao号顺序
rt = new prt.RenderText
rt.text = "第 " & s & " piao"
rt.Style.Font = New Font("黑体",
25, FontStyle.Bold)
rt.x = 2
rt.y = 2
ra.children.add(rt)
'---------------二维码
rt = new prt.RenderText
rt.Style.TextAlignHorz =
prt.AlignHorzEnum.Center
rt.text = "铜/铝巴加工状态表"
rt.Style.Font = New Font("黑体",
30, FontStyle.Bold)
rt.y = 1
ra.children.add(rt)
'---------------标题
rt = new prt.RenderText
rt.text = "弯头"
rt.Style.Font = New Font("黑体",
25)
rt.x = 140
rt.y = 15
ra.children.add(rt)
'----------------类型
rt = new prt.RenderText
rt.text = "1,开料人员必须确认最终加工工序,不需要的工序用'"
& "\" & "'划掉"
rt.Style.Font = New Font("黑体",
12)
rt.x = 2
rt.y = 15
ra.children.add(rt)
rt = new prt.RenderText
rt.text = "2,每个工序加工完后,必须打'"
& "√" & "'确认"
rt.Style.Font = New Font("黑体",
12)
rt.x = 2
rt.y = 20
ra.children.add(rt)
rt = new prt.RenderText
rt.text = "3,出货时,跟单员确认各个工序是否加工完,未加工完的不能出货"
rt.Style.Font = New Font("黑体",
12)
rt.x = 2
rt.y = 25
ra.children.add(rt)
'----------------加入表格
re = New prt.RenderTable()
re.x = 2
re.y = 30
re.Style.GridLines.All = New
prt.Linedef
re.Style.TextAlignHorz =
prt.AlignHorzEnum.center
re.Style.TextAlignVert =
prt.AlignVertEnum.center
re.Width = "Auto"
re.Cols(0).Width = 47
re.Cols(1).Width = 33
re.Cols(2).Width = 22
re.Cols(3).Width = 12
re.Cols(4).Width = 12
re.Cols(5).Width = 12
re.Cols(6).Width = 7
re.Cols(7).Width = 7
re.Cols(8).Width = 7
re.Cols(9).Width = 15
re.Cols(10).Width = 12
re.Cols(11).Width = 12
re.Style.Font = New Font("黑体",
15, FontStyle.Bold)
'-------------------------------------------表格样式设置
For c As Integer = 0 To 11
rt = new prt.RenderText
rt.Text = tt(c)
re.Cells(0,c).RenderObject
= rt
Next
For r As Integer = 1 To
Tables(ut).rows.count
If pn(s-1) =
Tables(ut).rows(r-1)("生产piao号")
'-----------------
rt = new
prt.RenderText
rt.text =
Tables(ut).rows(r-1)("型号")
re.cells(r,0).RenderObject = rt
rt = new prt.RenderText
rt.text = Tables(ut).rows(r-1)("生产piao号")
re.cells(r,1).RenderObject = rt
rt = new prt.RenderText
rt.text =
Tables(ut).rows(r-1)("订单号")
re.cells(r,2).RenderObject = rt
rt = new prt.RenderText
rt.text =
Tables(ut).rows(r-1)("数量")
re.cells(r,3).RenderObject = rt
End If
Next
ra.children.add(re)
ty = DataTables(name).GetComboListString("铣端头or打毛刺","[生产piao号]
=" & pn(s-1))
rt = new prt.RenderText
rt.text = "工序:" &
ty
rt.x =2
rt.y = 120
rt.Style.Font = New Font("黑体",
30, FontStyle.Bold)
ra.children.add(rt)
rt = new prt.RenderText
rt.text = "开料人:____________"
rt.x = 2
rt.y = 140
rt.Style.Font = New Font("黑体",
12, FontStyle.Bold)
ra.children.add(rt)
rt = new prt.RenderText
rt.text = "条数核对:____________"
rt.x = 210/2 -20
rt.y = 140
rt.Style.Font = New Font("黑体",
12, FontStyle.Bold)
ra.children.add(rt)
rt = new prt.RenderText
rt.text = "总净重:____________"
rt.x = 210 -40
rt.y = 140
rt.Style.Font = New Font("黑体",
12, FontStyle.Bold)
ra.children.add(rt)
doc.body.children.add(ra)
'---------------------上半张
Dim Line As New
prt.LineDef(2,Color.Black, DashStyle.Dot)
Dim ln As New
prt.RenderLine(2,297/2, 208, 297/2, Line)
doc.body.children.add(ln)
'---------------------------
ra = new prt.RenderArea
ra.Width =
"Parent.Width"
ra.Height = 297/2 - 3
ra.y = 297 / 2
'---------单张表大小
Bar = New BarCodeBuilder
Bar.Symbology = Barpro.Symbology.QRCode
Bar.Code = pn(s-1)
Bar.QuietZoneWidth = 2
Bar.QRCodeErrorCorrectionLevel
= Barpro.QRCodeErrorCorrectionLevel.H
Bar.QRCodeModuleSize = 1
img = new prt.RenderImage
img.Image = bar.GetImage
img.x =180
img.y=3
ra.children.add(img)
rt = new prt.RenderText
rt.Style.TextAlignHorz =
prt.AlignHorzEnum.Center
rt.text = "铜/铝巴加工状态表"
rt.Style.Font = New Font("黑体",
30, FontStyle.Bold)
rt.y = 1
ra.children.add(rt)
'---------------标题
'-----------piao号顺序
rt = new prt.RenderText
rt.text = "第 " & s & " piao"
rt.Style.Font = New Font("黑体",
25, FontStyle.Bold)
rt.x = 2
rt.y = 2
ra.children.add(rt)
'-------------
rt = new prt.RenderText
rt.text = "弯头"
rt.Style.Font = New Font("黑体",
25)
rt.x = 140
rt.y = 15
ra.children.add(rt)
'----------------类型
rt = new prt.RenderText
rt.text = "1,开料人员必须确认最终加工工序,不需要的工序用'"
& "\" & "'划掉"
rt.Style.Font = New Font("黑体",
12)
rt.x = 2
rt.y = 15
ra.children.add(rt)
rt = new prt.RenderText
rt.text = "2,每个工序加工完后,必须打'"
& "√" & "'确认"
rt.Style.Font = New Font("黑体",
12)
rt.x = 2
rt.y = 20
ra.children.add(rt)
rt = new prt.RenderText
rt.text = "3,出货时,跟单员确认各个工序是否加工完,未加工完的不能出货"
rt.Style.Font = New Font("黑体",
12)
rt.x = 2
rt.y = 25
ra.children.add(rt)
'----------------加入表格
re = New prt.RenderTable()
re.x = 2
re.y = 30
re.Style.GridLines.All = New
prt.Linedef
re.Style.TextAlignHorz =
prt.AlignHorzEnum.center
re.Style.TextAlignVert =
prt.AlignVertEnum.center
re.Width = "Auto"
re.Cols(0).Width = 47
re.Cols(1).Width = 33
re.Cols(2).Width = 22
re.Cols(3).Width = 12
re.Cols(4).Width = 12
re.Cols(5).Width = 12
re.Cols(6).Width = 7
re.Cols(7).Width = 7
re.Cols(8).Width = 7
re.Cols(9).Width = 15
re.Cols(10).Width = 12
re.Cols(11).Width = 12
re.Style.Font = New Font("黑体",
15, FontStyle.Bold)
'-------------------------------------------表格样式设置
For c As Integer = 0 To 11
rt = new prt.RenderText
rt.Text = tt(c)
re.Cells(0,c).RenderObject
= rt
Next
For r As Integer = 1 To
Tables(ut).rows.count
If pn(s-1) =
Tables(ut).rows(r-1)("生产piao号")
'-----------------
rt = new prt.RenderText
rt.text =
Tables(ut).rows(r-1)("型号")
re.cells(r,0).RenderObject = rt
rt = new prt.RenderText
rt.text =
Tables(ut).rows(r-1)("生产piao号")
re.cells(r,1).RenderObject = rt
rt = new prt.RenderText
rt.text =
Tables(ut).rows(r-1)("订单号")
re.cells(r,2).RenderObject = rt
rt = new prt.RenderText
rt.text =
Tables(ut).rows(r-1)("数量")
re.cells(r,3).RenderObject = rt
End If
Next
ra.children.add(re)
ty
= DataTables(name).GetComboListString("铣端头or打毛刺","[生产piao号]
=" & pn(s-1))
rt = new prt.RenderText
rt.text = "工序:" &
ty
rt.x =2
rt.y = 120
rt.Style.Font = New Font("黑体",
30, FontStyle.Bold)
ra.children.add(rt)
rt = new prt.RenderText
rt.text = "开料人:____________"
rt.x = 2
rt.y = 138
rt.Style.Font = New Font("黑体",
12, FontStyle.Bold)
ra.children.add(rt)
rt = new prt.RenderText
rt.text = "条数核对:____________"
rt.x = 210/2 -20
rt.y = 138
rt.Style.Font = New Font("黑体",
12, FontStyle.Bold)
ra.children.add(rt)
rt = new prt.RenderText
rt.text = "总净重:____________"
rt.x = 210 -40
rt.y = 138
rt.Style.Font = New Font("黑体",
12, FontStyle.Bold)
ra.children.add(rt)
doc.body.children.add(ra)
'------------------------------------------------------------珠江直身
Case "珠江直身开料单"
ra = new prt.RenderArea
ra.SplitVertBehavior =
prt.SplitBehaviorEnum.Never
ra.Width =
"Parent.Width"
ra.Height = 297/2
'---------单张表大小
Bar = New BarCodeBuilder
Bar.Symbology = Barpro.Symbology.QRCode
Bar.Code = pn(s-1)
Bar.QuietZoneWidth = 2
Bar.QRCodeErrorCorrectionLevel
= Barpro.QRCodeErrorCorrectionLevel.H
Bar.QRCodeModuleSize = 1
img = new prt.RenderImage
img.Image = bar.GetImage
img.x =180
img.y=3
ra.children.add(img)
'---------------二维码
rt = new prt.RenderText
rt.Style.TextAlignHorz =
prt.AlignHorzEnum.Center
rt.text = "铜/铝巴加工状态表"
rt.Style.Font = New Font("黑体",
30, FontStyle.Bold)
rt.y = 1
ra.children.add(rt)
'---------------标题
rt = new prt.RenderText
rt.text = "珠江直身"
rt.Style.Font = New Font("黑体",
25)
rt.x = 140
rt.y = 15
ra.children.add(rt)
'----------------类型
rt = new prt.RenderText
rt.text = "1,开料人员必须确认最终加工工序,不需要的工序用'"
& "\" & "'划掉"
rt.Style.Font = New Font("黑体",
12)
rt.x = 2
rt.y = 15
ra.children.add(rt)
rt = new prt.RenderText
rt.text = "2,每个工序加工完后,必须打'"
& "√" & "'确认"
rt.Style.Font = New Font("黑体",
12)
rt.x = 2
rt.y = 20
ra.children.add(rt)
rt = new prt.RenderText
rt.text = "3,出货时,跟单员确认各个工序是否加工完,未加工完的不能出货"
rt.Style.Font = New Font("黑体",
12)
rt.x = 2
rt.y = 25
ra.children.add(rt)
'----------------加入表格
re = New prt.RenderTable()
re.x = 2
re.y = 30
re.Style.GridLines.All = New
prt.Linedef
re.Style.TextAlignHorz =
prt.AlignHorzEnum.center
re.Style.TextAlignVert =
prt.AlignVertEnum.center
re.Width = "Auto"
re.Cols(0).Width = 47
re.Cols(1).Width = 33
re.Cols(2).Width = 22
re.Cols(3).Width = 12
re.Cols(4).Width = 12
re.Cols(5).Width = 12
re.Cols(6).Width = 7
re.Cols(7).Width = 7
re.Cols(8).Width = 7
re.Cols(9).Width = 15
re.Cols(10).Width = 12
re.Cols(11).Width = 12
re.Style.Font = New Font("黑体",
15, FontStyle.Bold)
'-------------------------------------------表格样式设置
For c As Integer = 0 To 11
rt = new prt.RenderText
rt.Text = tt(c)
re.Cells(0,c).RenderObject
= rt
Next
For r As Integer = 1 To
Tables(ut).rows.count
If pn(s-1) =
Tables(ut).rows(r-1)("生产piao号")
'-----------------
rt = new prt.RenderText
rt.text =
Tables(ut).rows(r-1)("型号")
re.cells(r,0).RenderObject = rt
rt = new prt.RenderText
rt.text =
Tables(ut).rows(r-1)("生产piao号")
re.cells(r,1).RenderObject = rt
rt = new prt.RenderText
rt.text =
Tables(ut).rows(r-1)("订单号")
re.cells(r,2).RenderObject = rt
rt = new prt.RenderText
rt.text =
Tables(ut).rows(r-1)("数量")
re.cells(r,3).RenderObject = rt
End If
Next
ra.children.add(re)
rt = new prt.RenderText
rt.text = "开料人:____________"
rt.x = 2
rt.y = 140
rt.Style.Font = New Font("黑体",
12, FontStyle.Bold)
ra.children.add(rt)
rt = new prt.RenderText
rt.text = "条数核对:____________"
rt.x = 210/2 -20
rt.y = 140
rt.Style.Font = New Font("黑体",
12, FontStyle.Bold)
ra.children.add(rt)
rt = new prt.RenderText
rt.text = "总净重:____________"
rt.x = 210 -40
rt.y = 140
rt.Style.Font = New Font("黑体",
12, FontStyle.Bold)
ra.children.add(rt)
doc.body.children.add(ra)
'---------------------上半张
Dim Line As New prt.LineDef(2,Color.Black,
DashStyle.Dot)
Dim ln As New
prt.RenderLine(2,297/2, 208, 297/2, Line)
doc.body.children.add(ln)
'---------------------------
ra = new prt.RenderArea
ra.Width = "Parent.Width"
ra.Height = 297/2 - 3
ra.y = 297 / 2
'---------单张表大小
Bar = New BarCodeBuilder
Bar.Symbology =
Barpro.Symbology.QRCode
Bar.Code = pn(s-1)
Bar.QuietZoneWidth = 2
Bar.QRCodeErrorCorrectionLevel
= Barpro.QRCodeErrorCorrectionLevel.H
Bar.QRCodeModuleSize = 1
img = new prt.RenderImage
img.Image = bar.GetImage
img.x =180
img.y=3
ra.children.add(img)
rt = new prt.RenderText
rt.Style.TextAlignHorz =
prt.AlignHorzEnum.Center
rt.text = "铜/铝巴加工状态表"
rt.Style.Font = New Font("黑体",
30, FontStyle.Bold)
rt.y = 1
ra.children.add(rt)
'---------------标题
rt = new prt.RenderText
rt.text = "珠江直身"
rt.Style.Font = New Font("黑体",
25)
rt.x = 140
rt.y = 15
ra.children.add(rt)
'----------------类型
rt = new prt.RenderText
rt.text = "1,开料人员必须确认最终加工工序,不需要的工序用'"
& "\" & "'划掉"
rt.Style.Font = New Font("黑体",
12)
rt.x = 2
rt.y = 15
ra.children.add(rt)
rt = new prt.RenderText
rt.text = "2,每个工序加工完后,必须打'"
& "√" & "'确认"
rt.Style.Font = New Font("黑体", 12)
rt.x = 2
rt.y = 20
ra.children.add(rt)
rt = new prt.RenderText
rt.text = "3,出货时,跟单员确认各个工序是否加工完,未加工完的不能出货"
rt.Style.Font = New Font("黑体",
12)
rt.x = 2
rt.y = 25
ra.children.add(rt)
'----------------加入表格
re = New prt.RenderTable()
re.x = 2
re.y = 30
re.Style.GridLines.All = New
prt.Linedef
re.Style.TextAlignHorz =
prt.AlignHorzEnum.center
re.Style.TextAlignVert =
prt.AlignVertEnum.center
re.Width = "Auto"
re.Cols(0).Width = 47
re.Cols(1).Width = 33
re.Cols(2).Width = 22
re.Cols(3).Width = 12
re.Cols(4).Width = 12
re.Cols(5).Width = 12
re.Cols(6).Width = 7
re.Cols(7).Width = 7
re.Cols(8).Width = 7
re.Cols(9).Width = 15
re.Cols(10).Width = 12
re.Cols(11).Width = 12
re.Style.Font = New Font("黑体",
15, FontStyle.Bold)
'-------------------------------------------表格样式设置
For c As Integer = 0 To 11
rt = new prt.RenderText
rt.Text = tt(c)
re.Cells(0,c).RenderObject
= rt
Next
For r As Integer = 1 To
Tables(ut).rows.count
If pn(s-1) =
Tables(ut).rows(r-1)("生产piao号")
'-----------------
rt = new prt.RenderText
rt.text =
Tables(ut).rows(r-1)("型号")
re.cells(r,0).RenderObject = rt
rt = new prt.RenderText
rt.text =
Tables(ut).rows(r-1)("生产piao号")
re.cells(r,1).RenderObject = rt
rt = new prt.RenderText
rt.text =
Tables(ut).rows(r-1)("订单号")
re.cells(r,2).RenderObject = rt
rt = new prt.RenderText
rt.text =
Tables(ut).rows(r-1)("数量")
re.cells(r,3).RenderObject = rt
End If
Next
ra.children.add(re)
rt = new prt.RenderText
rt.text = "开料人:____________"
rt.x = 2
rt.y = 138
rt.Style.Font = New Font("黑体",
12, FontStyle.Bold)
ra.children.add(rt)
rt = new prt.RenderText
rt.text = "条数核对:____________"
rt.x = 210/2 -20
rt.y = 138
rt.Style.Font = New Font("黑体",
12, FontStyle.Bold)
ra.children.add(rt)
rt = new prt.RenderText
rt.text = "总净重:____________"
rt.x = 210 -40
rt.y = 138
rt.Style.Font = New Font("黑体",
12, FontStyle.Bold)
ra.children.add(rt)
doc.body.children.add(ra)
'------------------------------------------------------------珠江弯头
Case "珠江弯头开料单"
ra = new prt.RenderArea
ra.SplitVertBehavior =
prt.SplitBehaviorEnum.Never
ra.Width =
"Parent.Width"
ra.Height = 297/2
'---------单张表大小
Bar = New BarCodeBuilder
Bar.Symbology =
Barpro.Symbology.QRCode
Bar.Code = pn(s-1)
Bar.QuietZoneWidth = 2
Bar.QRCodeErrorCorrectionLevel
= Barpro.QRCodeErrorCorrectionLevel.H
Bar.QRCodeModuleSize = 1
img = new prt.RenderImage
img.Image = bar.GetImage
img.x =180
img.y=3
ra.children.add(img)
'---------------二维码
'-----------piao号顺序
rt = new prt.RenderText
rt.text = "第 " & s & " piao"
rt.Style.Font = New Font("黑体",
25, FontStyle.Bold)
rt.x = 2
rt.y = 2
ra.children.add(rt)
'-------------
rt = new prt.RenderText
rt.Style.TextAlignHorz =
prt.AlignHorzEnum.Center
rt.text = "铜/铝巴加工状态表"
rt.Style.Font = New Font("黑体",
30, FontStyle.Bold)
rt.y = 1
ra.children.add(rt)
'---------------标题
rt = new prt.RenderText
rt.text = "珠江弯头"
rt.Style.Font = New Font("黑体",
25)
rt.x = 140
rt.y = 15
ra.children.add(rt)
'----------------类型
rt = new prt.RenderText
rt.text = "1,开料人员必须确认最终加工工序,不需要的工序用'"
& "\" & "'划掉"
rt.Style.Font = New Font("黑体",
12)
rt.x = 2
rt.y = 15
ra.children.add(rt)
rt = new prt.RenderText
rt.text = "2,每个工序加工完后,必须打'"
& "√" & "'确认"
rt.Style.Font = New Font("黑体",
12)
rt.x = 2
rt.y = 20
ra.children.add(rt)
rt = new prt.RenderText
rt.text = "3,出货时,跟单员确认各个工序是否加工完,未加工完的不能出货"
rt.Style.Font = New Font("黑体",
12)
rt.x = 2
rt.y = 25
ra.children.add(rt)
'----------------加入表格
re = New prt.RenderTable()
re.x = 2
re.y = 30
re.Style.GridLines.All = New
prt.Linedef
re.Style.TextAlignHorz =
prt.AlignHorzEnum.center
re.Style.TextAlignVert =
prt.AlignVertEnum.center
re.Width = "Auto"
re.Cols(0).Width = 47
re.Cols(1).Width = 33
re.Cols(2).Width = 22
re.Cols(3).Width = 12
re.Cols(4).Width = 12
re.Cols(5).Width = 12
re.Cols(6).Width = 7
re.Cols(7).Width = 7
re.Cols(8).Width = 7
re.Cols(9).Width = 15
re.Cols(10).Width = 12
re.Cols(11).Width = 12
re.Style.Font = New Font("黑体",
15, FontStyle.Bold)
'-------------------------------------------表格样式设置
For c As Integer = 0 To 11
rt = new prt.RenderText
rt.Text = tt(c)
re.Cells(0,c).RenderObject
= rt
Next
For r As Integer = 1 To
Tables(ut).rows.count
If pn(s-1) =
Tables(ut).rows(r-1)("生产piao号")
'-----------------
rt = new prt.RenderText
rt.text =
Tables(ut).rows(r-1)("型号")
re.cells(r,0).RenderObject = rt
rt = new prt.RenderText
rt.text =
Tables(ut).rows(r-1)("生产piao号")
re.cells(r,1).RenderObject = rt
rt = new prt.RenderText
rt.text =
Tables(ut).rows(r-1)("订单号")
re.cells(r,2).RenderObject = rt
rt = new prt.RenderText
rt.text = Tables(ut).rows(r-1)("数量")
re.cells(r,3).RenderObject = rt
End If
Next
ra.children.add(re)
rt = new prt.RenderText
rt.text = "开料人:____________"
rt.x = 2
rt.y = 140
rt.Style.Font = New Font("黑体",
12, FontStyle.Bold)
ra.children.add(rt)
rt = new prt.RenderText
rt.text = "条数核对:____________"
rt.x = 210/2 -20
rt.y = 140
rt.Style.Font = New Font("黑体",
12, FontStyle.Bold)
ra.children.add(rt)
rt = new prt.RenderText
rt.text = "总净重:____________"
rt.x = 210 -40
rt.y = 140
rt.Style.Font = New Font("黑体",
12, FontStyle.Bold)
ra.children.add(rt)
doc.body.children.add(ra)
'---------------------上半张
Dim Line As New
prt.LineDef(2,Color.Black, DashStyle.Dot)
Dim ln As New
prt.RenderLine(2,297/2, 208, 297/2, Line)
doc.body.children.add(ln)
'---------------------------
ra = new prt.RenderArea
ra.Width =
"Parent.Width"
ra.Height = 297/2 - 3
ra.y = 297 / 2
'---------单张表大小
Bar = New BarCodeBuilder
Bar.Symbology =
Barpro.Symbology.QRCode
Bar.Code = pn(s-1)
Bar.QuietZoneWidth = 2
Bar.QRCodeErrorCorrectionLevel
= Barpro.QRCodeErrorCorrectionLevel.H
Bar.QRCodeModuleSize = 1
img = new prt.RenderImage
img.Image = bar.GetImage
img.x =180
img.y=3
ra.children.add(img)
rt = new prt.RenderText
rt.Style.TextAlignHorz =
prt.AlignHorzEnum.Center
rt.text = "铜/铝巴加工状态表"
rt.Style.Font = New Font("黑体",
30, FontStyle.Bold)
rt.y = 1
ra.children.add(rt)
'---------------标题
'-----------piao号顺序
rt = new prt.RenderText
rt.text = "第 " & s & " piao"
rt.Style.Font = New Font("黑体",
25, FontStyle.Bold)
rt.x = 2
rt.y = 2
ra.children.add(rt)
'-------------
rt = new prt.RenderText
rt.text = "珠江弯头"
rt.Style.Font = New Font("黑体",
25)
rt.x = 140
rt.y = 15
ra.children.add(rt)
'----------------类型
rt = new prt.RenderText
rt.text = "1,开料人员必须确认最终加工工序,不需要的工序用'"
& "\" & "'划掉"
rt.Style.Font = New Font("黑体",
12)
rt.x = 2
rt.y = 15
ra.children.add(rt)
rt = new prt.RenderText
rt.text = "2,每个工序加工完后,必须打'"
& "√" & "'确认"
rt.Style.Font = New Font("黑体",
12)
rt.x = 2
rt.y = 20
ra.children.add(rt)
rt = new prt.RenderText
rt.text = "3,出货时,跟单员确认各个工序是否加工完,未加工完的不能出货"
rt.Style.Font = New Font("黑体",
12)
rt.x = 2
rt.y = 25
ra.children.add(rt)
'----------------加入表格
re = New prt.RenderTable()
re.x = 2
re.y = 30
re.Style.GridLines.All = New
prt.Linedef
re.Style.TextAlignHorz =
prt.AlignHorzEnum.center
re.Style.TextAlignVert =
prt.AlignVertEnum.center
re.Width = "Auto"
re.Cols(0).Width = 47
re.Cols(1).Width = 33
re.Cols(2).Width = 22
re.Cols(3).Width = 12
re.Cols(4).Width = 12
re.Cols(5).Width = 12
re.Cols(6).Width = 7
re.Cols(7).Width = 7
re.Cols(8).Width = 7
re.Cols(9).Width = 15
re.Cols(10).Width = 12
re.Cols(11).Width = 12
re.Style.Font = New Font("黑体", 15, FontStyle.Bold)
'-------------------------------------------表格样式设置
For c As Integer = 0 To 11
rt = new prt.RenderText
rt.Text = tt(c)
re.Cells(0,c).RenderObject = rt
Next
For r As Integer = 1 To Tables(ut).rows.count
If pn(s-1) = Tables(ut).rows(r-1)("生产piao号")
'-----------------
rt = new prt.RenderText
rt.text = Tables(ut).rows(r-1)("型号")
re.cells(r,0).RenderObject = rt
rt = new prt.RenderText
rt.text = Tables(ut).rows(r-1)("生产piao号")
re.cells(r,1).RenderObject = rt
rt = new prt.RenderText
rt.text = Tables(ut).rows(r-1)("订单号")
re.cells(r,2).RenderObject = rt
rt = new prt.RenderText
rt.text = Tables(ut).rows(r-1)("数量")
re.cells(r,3).RenderObject = rt
End If
Next
ra.children.add(re)
rt = new
prt.RenderText
rt.text = "开料人:____________"
rt.x = 2
rt.y = 138
rt.Style.Font = New Font("黑体",
12, FontStyle.Bold)
ra.children.add(rt)
rt = new
prt.RenderText
rt.text = "条数核对:____________"
rt.x = 210/2 -20
rt.y = 138
rt.Style.Font = New Font("黑体",
12, FontStyle.Bold)
ra.children.add(rt)
rt
= new prt.RenderText
rt.text = "总净重:____________"
rt.x = 210 -40
rt.y = 138
rt.Style.Font = New Font("黑体", 12,
FontStyle.Bold)
ra.children.add(rt)
doc.body.children.add(ra)
End Select
Next
doc.preview()
End If