【发布时间】:2015-09-02 13:35:43
【问题描述】:
我想在同一个报告页面上打印一个确定数量的同一个条形码,我使用了这个代码但它不起作用:
' ###### I try to repeat the function to generate the same barcode 6 times #######
Private Sub ExampleBarcode_BeforePrint(sender As Object, e As System.Drawing.Printing.PrintEventArgs) Handles Me.BeforePrint
For i As Integer = 1 To 6
Me.Detail.Controls.Add(CreateQRCodeBarCode("01234ft78"))
Next
End Sub
Public Function CreateQRCodeBarCode(ByVal BarCodeText As String) As XRBarCode
Dim barCode As New XRBarCode()
barCode.Symbology = New Code128Generator()
barCode.Text = BarCodeText
barCode.Width = 240
barCode.Height = 70
barCode.Module = 1
CType(barCode.Symbology, Code128Generator).CalcCheckSum = False
CType(barCode.Symbology, Code128Generator).CharacterSet = Code128Charset.CharsetAuto
Return barCode
End Function
【问题讨论】:
-
什么不起作用? XRbarCode 是不是可以添加到 contol-collection 的类?
-
正在工作,但它只打印一次条形码,而不是连续打印 6 次。问题是我无法上传图片来展示我需要的东西。
标签: vb.net devexpress xtrareport