Dim drs As List(of DataRow)
drs = DataTables("销售出库单_明细").Select("出库单号 = \'" & pr("出库单号") & "\'")
For i As Integer = 0 To drs.Count - 1
Dim ra As New prt.RenderArea
Dim rt As prt.RenderText
ra.Width = Cint(Vars("tagW")) \'标签宽
ra.Height = Cint(Vars("tagH")) \'标签高
ra.Style.Spacing.All = 1
ra.Style.Borders.All = New prt.Linedef(0.3, Color.black) \'设置边框
ra.SplitHorzBehavior = prt.SplitBehaviorEnum.Never \'禁止水平分割
ra.SplitVertBehavior = prt.SplitBehaviorEnum.Never \'禁止垂直分割
Doc.Body.ChildRen.Add(ra) \'将容器加入到报表中
rt = New prt.RenderText
rt.Text = company \'公司名称
rt.Style.TextAlignHorz = prt.AlignHorzEnum.Center \'水平居中
rt.Style.TextAlignVert = prt.AlignVertEnum.Center \'垂直居中
rt.Style.FontSize = prt_UpFontsize \'字体大小(磅)
\'rt.X = 30
rt.Y = prt_Upspacing \'抬头与主体的间距 prt_Uplinespacing \'行间距
ra.Children.Add(rt) \'添加到容器中
rt = New prt.RenderText
rt.Text = "出库日期: " & pr("出库日期")
rt.X = xL
rt.Y = "Prev.Bottom + 2 *" & sh \'主体首行与抬头两倍行距
rt.Style.FontSize = fs \'字体大小(磅)
ra.Children.Add(rt) \'添加到容器中
rt = New prt.RenderText
rt.Text = "客户: " & pr("收货单位")
rt.X = xL
rt.Y = "Prev.Bottom + " & sh \'垂直坐标位于迁移对象之下的2毫米
rt.Style.FontSize = fs \'字体大小(磅)
ra.Children.Add(rt) \'添加到容器中
rt = New prt.RenderText
rt.Text = "品名: " & drs(i)("品名")
rt.X = xL
rt.Y = "Prev.Bottom + " & sh \'垂直坐标位于迁移对象之下的2毫米
rt.Style.FontSize = fs \'字体大小(磅)
ra.Children.Add(rt)
rt = New prt.RenderText
rt.Text = "规格: " & drs(i)("规格")
rt.X = xL
rt.Y = "Prev.Bottom + " & sh \'垂直坐标位于迁移对象之下的2毫米
rt.Style.FontSize = fs \'字体大小(磅)
ra.Children.Add(rt)
rt = New prt.RenderText
rt.Text = "数量: " & drs(i)("数量")
rt.X = xL
rt.Y = "Prev.Bottom + " & sh \'垂直坐标位于迁移对象之下的2毫米
rt.Style.FontSize = fs \'字体大小(磅)
ra.Children.Add(rt)
rt = New prt.RenderText
rt.Text = "检验员: "
rt.X = xL
rt.Y = "Prev.Bottom + " & sh \'垂直坐标位于迁移对象之下的2毫米
rt.Style.FontSize = fs \'字体大小(磅)
ra.Children.Add(rt)
rt = New prt.RenderText
rt.Text = "备注: " & drs(i)("备注")
rt.X = xL
rt.Y = "Prev.Bottom + " & sh \'垂直坐标位于迁移对象之下的2毫米
rt.Style.FontSize = fs \'字体大小(磅)
ra.Children.Add(rt)
Next
Doc.Preview() \'预览报表