下面代码是将当前表所有分册编号的全部生成报表出来了
有没有办法加上一个条件使之只生成当前【卷宗编号】的二维码记录表呢?
Dim doc As New PrintDoc
Dim rg As prt.RenderGraphics
Dim Bar As New BarCodeBuilder
Bar.Symbology = Barpro.Symbology.QRCode
Doc.Stacking = prt.StackingRulesEnum.InlineLeftToRight
For Each r As Row In Tables("入库明细").Rows
bar.Code = r("分册编号的")
rg = new prt.RenderGraphics
bar.DrawOnCanvas(rg.Graphics,0,0,1)
rg.Style.Spacing.All = 1
Doc.Body.Children.Add(rg)
Next
Doc.Preview()
自行修改为下面的代码 初步可以实现效果【不知道是否有更好的办法呢?】
Dim ab As Row = Tables("卷宗入库").Current
Dim doc As New PrintDoc
Dim rg As prt.RenderGraphics
Dim Bar As New BarCodeBuilder
Bar.Symbology = Barpro.Symbology.QRCode
Doc.Stacking = prt.StackingRulesEnum.InlineLeftToRight
For Each r As Row In Tables("入库明细").Rows
If r("卷宗编号")=ab("卷宗编号") Then
bar.Code = r("分册编号")
rg = new prt.RenderGraphics
bar.DrawOnCanvas(rg.Graphics,0,0,1)
rg.Style.Spacing.All = 1
Doc.Body.Children.Add(rg)
End If
Next
Doc.Preview()