Dim doc As New PrintDoc
doc.PageSetting.Width =cint(Tables("参数设置").Current("纸宽"))
doc.PageSetting.Height=cint(Tables("参数设置").Current("纸高"))
doc.PageSetting.TopMargin=cint(Tables("参数设置").Current("上边距"))
doc.PageSetting.LeftMargin=cint(Tables("参数设置").Current("左边距"))
doc.PageSetting.RightMargin=cint(Tables("参数设置").Current("右边距"))
doc.PageSetting.BottomMargin=cint(Tables("参数设置").Current("下边距"))
doc.AutoRotate = False
Dim i As Integer=1
For Each r As Row In Tables("团长信息").Rows
Dim rt As New prt.RenderTable()
Dim rx As New prt.RenderText
rx = new prt.RenderText
rx.text = "团长信息"
rx.Style.FontBold = True
rx.Style.FontSize = cint(Tables("参数设置").Current("团长信息标题字体大小"))
rx.Style.TextAlignHorz = prt.AlignHorzEnum.Center
rx.Style.Spacing.Bottom = 2
If i>2
rx.BreakBefore = prt.BreakEnum.page
End If
doc.Body.Children.Add(rx)
rt.Cols.Count = 6
rt.Cols(0).Width = cint(Tables("参数设置").Current("团长姓名宽度"))
rt.Cols(1).Width = cint(Tables("参数设置").Current("团长电话宽度"))
rt.Cols(2).Width =cint(Tables("参数设置").Current("团长小区宽度"))
rt.Cols(3).Width =cint(Tables("参数设置").Current("详细地址宽度"))
rt.Cols(4).Width =cint(Tables("参数设置").Current("线路宽度"))
rt.Cols(5).Width =cint(Tables("参数设置").Current("区域宽度"))
rt.CellStyle.Spacing.All = 0.1
rt.Style.GridLines.All = New prt.Linedef
rt.Style.TextAlignVert = prt.AlignVertEnum.Center
rt.Style.TextAlignHorz = prt.AlignHorzEnum.Center
rt.Style.FontSize = cint(Tables("参数设置").Current("团长信息明细字体大小"))
'rt.Rows(6).Style.TextAlignVert = prt.AlignVertEnum.Top
rx = new prt.RenderText
rt.Cells(i,0).Text= "团长姓名"
rt.Cells(i,1).Text= "团长电话"
rt.Cells(i,2).Text = "团长小区"
rt.Cells(i,3).Text = "详细地址"
rt.Cells(i,4).Text = "线路"
rt.Cells(i,5).Text = "区域"
i=i+1
rt.Cells(i,0).Text= r("团长姓名")
rt.Cells(i,1).Text =r("团长电话")
rt.Cells(i,2).Text= r("团长小区")
rt.Cells(i,3).Text= r("详细地址")
rt.Cells(i,4).Text= r("线路")
rt.Cells(i,5).Text= r("区域")
doc.Body.Children.Add(rt)
i=i+1
rx = new prt.RenderText
rx.text = "商品数据总汇"
rx.Style.FontBold = True
rx.Style.FontSize = cint(Tables("参数设置").Current("商品数据总汇标题字体大小"))
rx.Style.TextAlignHorz = prt.AlignHorzEnum.Center
rx.Style.Spacing.Bottom = 2
doc.Body.Children.Add(rx)
Dim rt1 As New prt.RenderTable()
rt1.Cols.Count = 7
rt1.Cols(0).Width = cint(Tables("参数设置").Current("商品数据总汇序号宽度"))
rt1.Cols(1).Width = cint(Tables("参数设置").Current("商品数据总汇商品名称宽度"))
rt1.Cols(2).Width =cint(Tables("参数设置").Current("商品数据总汇一级分类宽度"))
rt1.Cols(3).Width =cint(Tables("参数设置").Current("商品数据总汇商品规格宽度"))
rt1.Cols(4).Width =cint(Tables("参数设置").Current("商品数据总汇数量宽度"))
rt1.Cols(5).Width =cint(Tables("参数设置").Current("商品数据总汇单价宽度"))
rt1.Cols(6).Width =cint(Tables("参数设置").Current("商品数据总汇总价宽度"))
rt1.CellStyle.Spacing.All = 0.1
rt1.Style.GridLines.All = New prt.Linedef
rt1.Style.TextAlignVert = prt.AlignVertEnum.Center
rt1.Style.TextAlignHorz = prt.AlignHorzEnum.Center
rt1.Style.FontSize = cint(Tables("参数设置").Current("商品数据总汇明细字体大小"))
'rt.Rows(6).Style.TextAlignVert = prt.AlignVertEnum.Top
rt1.Cells(i,0).Text= "序号"
rt1.Cells(i,1).Text= "商品名称"
rt1.Cells(i,2).Text = "一级分类"
rt1.Cells(i,3).Text = "商品规格"
rt1.Cells(i,4).Text = "数量"
rt1.Cells(i,5).Text = "单价"
rt1.Cells(i,6).Text = "总价"
i=i+1