Dim doc As New PrintDoc '定义一个报表
Dim rt As New prt.RenderTable() '定义一个表格对象
Dim rs As New prt.RenderText() '定义一个文本对象
rt.Style.GridLines.All = New prt.LineDef '将网格线类型设为默认类型
rt.Rows.Count = 60 '设置行数
rt.Cols.Count = 3 '设置列数
For i As Integer = 1 To rt.Rows.Count
rt.Rows(i).Height = 6 '设置行高
Next
rs.Text = "表格标题" '设置文本对象的内容
rs.Style.Spacing.Bottom = 10 '标题和后续对象的垂直间隔为10毫米
rs.Style.Font = New Font("宋体", 24 , FontStyle.Bold) '设置文本对象的字体
rs.Style.TextAlignHorz = prt.AlignHorzEnum.Center '文本内容水平居中
Doc.PageHeader = rs
doc.Body.Children.Add(rt) '将表格对象加入到报表中
Doc.Preview() '预览报表