只要固定宽高,怎么画都可以
Dim doc As New PrintDoc '定义一个报表
Dim rt As New prt.RenderTable() '定义一个表格对象
doc.Body.Children.Add(rt) '将表格对象加入到报表中
rt.Style.GridLines.All = New prt.Linedef '设置网格线
'下面的代码向表格中填入值
For r As Integer = 0 To 2
For c As Integer = 0 To 5
Dim rx As New prt.RenderText '定义一个文本对象
rx.Text = r & "," & c '为文本对象设置内容
rt.Cells(r, c).RenderObject = rx '将文本对象放置在单元格中
Next
Next
rt.rows(3).Height = 20
rt.Cols(0).Width = 30
Dim Line As New prt.LineDef(2, Color.Red)
Dim ln As New prt.RenderLine(0,10,30,10, Line)
rt.Cells(3, 0).area.Children.Add(ln)
rt.Cols(1).Width = 30
line = New prt.LineDef(2, Color.Red)
ln = New prt.RenderLine(0,10,15,10, Line)
rt.Cells(3, 1).area.Children.Add(ln)
doc.Preview() '预览报表