Dim doc As PrintDoc = e.Form.GernatePrintDoc()
Dim rx As New prt.RenderTable
rx.Cells(0,0).Text = "上海金属新材料有限公司"
rx.Cells(1,0).Text = "原料入库通知单"
rx.Cols(0).Style.TextAlignHorz = prt.AlignHorzEnum.Center '设置居中
rx.CellStyle.Spacing.Bottom = 0.5 '底端内容缩进0.5毫米
rx.Cells(0,0).Style.FontSize = 16 '设置字体大小
rx.Cells(1,0).Style.FontSize = 14 '设置字体大小
Doc.PageHeader = rx '作为页眉使用
Dim rx1 As New prt.RenderTable
rx1.Cells(0,0).Text = "制单:" & CurrentTable.Current("录入人")
rx1.Cells(0,1).Text = "制单时间:" & CurrentTable.Current("录入时间")
rx1.Cells(0,2).Text = "打印日期:" & Date.Today
rx1.Cells(1,0).Text = " "
rx1.Cells(2,0).Text = "一式四联: 【白色】 财务 【红色】 统计"
rx1.Cells(2,1).Text = "【蓝色】 营销 【黄色】 仓库 "
rx1.Cells(2,2).Text = "第[PageNo]页,共[PageCount]页"
rx1.Cols(0).Style.TextAlignHorz = prt.AlignHorzEnum.Left
rx1.Cols(1).Style.TextAlignHorz = prt.AlignHorzEnum.Center
rx1.Cols(2).Style.TextAlignHorz = prt.AlignHorzEnum.right
rx1.CellStyle.Spacing.Bottom = 0.5 '底端内容缩进0.5毫米
rx1.Style.FontSize = 8 '字体大小为8磅
Doc.PageFooter = rx1 '作为页脚使用
doc.Preview() '预览