Case "一等分(241cm*210cm)"
e.Form.page.width=241
e.Form.page.height=280
e.Form.Page.LeftMargin = r("左边距") '设置左边距
e.Form.Page.RightMargin = r("右边距") '设置右边距
e.Form.Page.TopMargin = r("上边距") '设置上边距
e.Form.Page.BottomMargin = r("下边距") '设置下边距
Case "二等分(241cm*140cm)"
e.Form.page.width=241
e.Form.page.height=140
e.Form.Page.LeftMargin = r("左边距") '设置左边距
e.Form.Page.RightMargin = r("右边距") '设置右边距
e.Form.Page.TopMargin = r("上边距") '设置上边距
e.Form.Page.BottomMargin = r("下边距") '设置下边距
e.Form.Controls("Table1").MaxRows = 12
Case "三等分(241cm*93cm)"
e.Form.page.width=241
e.Form.page.height=93
e.Form.Page.LeftMargin = r("左边距") '设置左边距
e.Form.Page.RightMargin = r("右边距") '设置右边距
e.Form.Page.TopMargin = r("上边距") '设置上边距
e.Form.Page.BottomMargin = r("下边距") '设置下边距
e.Form.Controls("Table1").MaxRows = 4
End Select
Dim b1 As WinForm.Label = e.Form.Controls("Label17")'是否显示三联单标签
If b1.visible = False Then
b1.Printable = False
Else
b1.Printable = True
End If
Dim doc As PrintDoc = e.Form.GernatePrintDoc()
doc.AutoRotate = False '禁止自动旋转打印内容
doc.Preview()