If Tables("职业健康检查表_table1").Current Is Nothing Then
MessageBox.Show("当前没有加载数据!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
Return
Else
Dim r As Row = Tables("职业健康检查表_table1").Current
Dim doc As New Printdoc
Dim rt As prt.RenderTable
rt = New prt.RenderTable
rt.Style.GridLines.All = New Prt.LineDef(0.2, Color.Black)
rt.Rows.Count = 200
rt.Cols.Count = 10
rt.Cells(0,0).SpanCols = 10
rt.Cells(0,0).Text = "XX市XXX疾病预防控制中心职业健康" & vbcrlf & "检查报告"
rt.Rows(0).Style.Font = New Font("宋体", 18, FontStyle.Bold)
rt.Rows(0).Height = 30
rt.Rows(0).Style.TextAlignVert = prt.AlignVertEnum.bottom
rt.Rows(0).Style.TextAlignHorz = prt.AlignHorzEnum.Center
rt.Style.LineSpacing = 200
rt.Cells(1,0).SpanCols = 10
Dim rm As New prt.RenderImage '定义一个图片对象
rm.Width = 30
rm.Height = 20
rm.Image = GetImage("cdc.png") '设置图片
' rm.Style.ImageAlign.KeepAspectRatio = False '取消保持原有比例
rt.Cells(1,0).Image = rm.Image
rt.Cells(1,0).Style.ImageAlign.AlignHorz = prt.ImageAlignHorzEnum.Center
rt.Cells(1,0).Style.ImageAlign.AlignVert = prt.ImageAlignHorzEnum.Center
' rt.Cells(1,0).Style.ImageAlign.KeepAspectRatio = False '取消保持原有比例
rt.Cells(1,0).Style.Padding.Top = 20
rt.Rows(1).Height = 40
doc.AutoRotate = False