-- 作者:hanlingli111999
-- 发布时间:2020/12/25 14:29:00
--
Dim doc As New Printdoc
Dim rx As prt.RenderText
Dim rt As prt.RenderTable
Dim Rows As List(Of DataRow)
Dim tbl As Table = Tables("承包合同")
Dim cnt As Integer
Dim tb2 As Table = Tables("分包合同")
For i As Integer = tbl.TopRow To
tbl.BottomRow
rx = New prt.RenderText
\' rx.BreakBefore = prt.BreakEnum.Page \'另起一页再打印
rx.Style.FontSize = 14
rx.Style.FontBold = True
rx.Style.Spacing.Bottom = 5
rx.Text = "承包合同: " & Tables("承包合同").Rows(i)("承包合同名称")
rx.style.TextAlignHorz = prt.AlignHorzEnum.center
doc.Body.Children.Add(rx)
rt = New prt.RenderTable
rt.Style.Spacing.Bottom = 3
rt.Cols.Count = 2
rt.Style.FontBold = True
rt.Cells(0,0).Text = "合同编号:" &
Tables("承包合同").Rows(i)("承包合同编号")
rt.Cells(0,0).Style.TextAlignHorz =
prt.AlignHorzEnum.Left
rt.Cells(1,0).Text = "建设单位:" &
Tables("承包合同").Rows(i)("建设单位")
rt.Cells(1,0).Style.TextAlignHorz =
prt.AlignHorzEnum.Left
rt.Cells(0,1).Text = "合同额:" &
Tables("承包合同").Rows(i)("承包合同额元")&"元"
rt.Cells(0,1).Style.TextAlignHorz =
prt.AlignHorzEnum.Right
rt.Cells(2,0).Text = "联系人:" &
Tables("承包合同").Rows(i)("联系人")
rt.Cells(2,0).Style.TextAlignHorz =
prt.AlignHorzEnum.Left
rt.Cells(1,1).Text = "结算值:" &
Tables("承包合同").Rows(i)("承包结算值元")&"元"
rt.Cells(1,1).Style.TextAlignHorz =
prt.AlignHorzEnum.Right
rt.Cells(2,1).Text = "已回款:" &
Tables("承包合同").Rows(i)("已回款元")&"元"
rt.Cells(2,1).Style.TextAlignHorz =
prt.AlignHorzEnum.Right
rt.Cells(3,1).Text = "回款率:" &
Tables("承包合同").Rows(i)("回款率")&"%"
rt.Cells(3,1).Style.TextAlignHorz =
prt.AlignHorzEnum.Right
Doc.Body.Children.Add(rt)
rt = New prt.RenderTable
rt.Style.TextAlignHorz = prt.AlignHorzEnum.Center
rt.Style.TextAlignVert = prt.AlignVertEnum.Center
rt.Style.Borders.Bottom = New prt.LineDef(0.3,Color.LightGray)
rt.CellStyle.Spacing.All = 1
rt.Cols.Count = 4
rt.Cells(0,0).Text = "分包合同编号"
rt.Cells(0,1).Text = "分包合同名称"
rt.Cells(0,2).Text = "分包单位"
rt.Cells(0,3).Text = "分包合同额元"
rt.Cells(0,4).Text = "分包结算值元"
rt.Cells(0,5).Text = "已付款元"
rt.Cells(0,6).Text = "付款率%"
rt.Cells(0,7).Text = "联系人"
rt.Cells(0,8).Text = "质保日期"
|