参考:
Dim doc As New PrintDoc '定义一个报表
Dim tbl As Table = Tables("DXJ")
Dim rt As prt.RenderText '定义一个文本对象
For i As Integer = tbl.TopRow To tbl.BottomRow Step 5
Dim rw As Row = tbl.Rows(i)
Dim s As String = rw("答案")
For j As Integer = 1 To 4
If i+j <= tbl.BottomRow
rw = tbl.Rows(i+j)
s = s & rw("答案")
End If
Next
rt = New prt.RenderText() '创建文本对象
rt.Text = i+1 & "-" & i+5 & ":" & s '设置文本对象的内容
rt.Style.Spacing.Bottom = 3 '设置下间隔为3毫米
rt.SplitVertBehavior = prt.SplitBehaviorEnum.Never '禁止被垂直分割
rt.Style.TextAlignVert = prt.AlignVertEnum.Center '垂直居中
doc.Body.Children.Add(rt) '将文本对象加入到报表
Next
Doc.Preview() '预览报表