Dim doc As New PrintDoc() '定义一个报表
Dim rt As prt.RenderText '定义一个文本对象
Dim rg As prt.RenderGraphics
Dim Bar As BarCodeBuilder
doc.Stacking = prt.StackingRulesEnum.InlineLeftToRight '设置排列方式
For i As Integer = 0 To 10
Bar.Symbology = Barpro.Symbology.Code128
bar.Code ="12345678901234567890"
rg = new prt.RenderGraphics
rg.X = 10
rg.Y = 25
bar.BarRatio = 0.8
bar.BarHeight = 12
bar.BarWidth = 0.3
bar.DisplayCode =False
bar.DrawOnCanvas(rg.Graphics,0,0,1)
rg.Width = 39 '宽度为39毫米
rg.Height = 35 '宽度为35毫米
rg.Style.Spacing.All = 2 '设置各个方向的间隔
rg.Style.Borders.All = New prt.Linedef(1, Color.Red) '设置边框
rg.Style.TextAlignHorz = prt.AlignHorzEnum.Center '水平居中
rg.Style.TextAlignVert = prt.AlignVertEnum.Center '垂直居中
doc.Body.Children.Add(rg) '将文本对象加入到报表
Next
doc.Preview() '预览
在红色部分报错,是什么原因,帮我看下,谢谢!