Dim doc As New PrintDoc '定义一个报表
Dim ra As New prt.RenderArea '定义一个容器
Dim rt As New prt.RenderTable '定义一个表格
With rt '表格设置(瞎设)
.Cols.Count = 3
.Rows.Count = 3
.Width = 150
.Height = 150
End With
For i As Integer = 0 To 2
rt.Cells(i,0).Text = "点点滴滴"
Next
With ra
.Style.BackgroundImage = GetImage("C:\Documents and Settings\Administrator\桌面\bg05.jpg") '图片自己改
.Style.BackgroundImageAlign.KeepAspectRatio = False '是否保持图片的纵横比例
.Children.Add(rt) '添加表格
End With
doc.Body.Children.Add(ra) '添加容器
Doc.Preview()