答案排序,循环语句,最后一个数字,如何变成总计的数字,例如总共101题,最后一个数字是101,而不是96-100,或者说再加一题,最后一行显示101-102
自己越改越不对啦,求大神指点
此主题相关图片如下:答案排序.png

'答案报表
Dim daaa As New prt.RenderArea
daaa.Stacking = prt.StackingRulesEnum.InlineLeftToRight
doc.Body.Children.Add(daaa)
daaa.Width = "Parent.Width"
For i As Integer = tbl.TopRow To tbl.BottomRow Step 5
Dim rw As Row = tbl.Rows(i)
Dim h As Integer
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("答案")
s = s.ToUpper
h = i-tbl.TopRow
End If
Next
Output.Show(h)
Dim xhda As New prt.RenderText '定义一个文本对象
Dim da As New prt.RenderArea '定义一个容器
da.Width = 45 '宽度53毫米
'da.Height = 24 '高度24毫米
da.SplitHorzBehavior = prt.SplitBehaviorEnum.Never '禁止水平分割
da.SplitVertBehavior = prt.SplitBehaviorEnum.Never '禁止垂直分割
daaa.ChildRen.Add(da) '将容器加入到报表中
'加入标题
xhda.text = h+1 & "-" & h+5 & ":" & s
'xhda.Style.FontBold = True '字体加粗
xhda.Style.FontSize = 16 '大体大小为16磅
da.Children.Add(xhda) '加入到容器中
Next