reportviewercore icon indicating copy to clipboard operation
reportviewercore copied to clipboard

Barcodes support

Open janslavsky opened this issue 1 year ago • 2 comments

Hello Ikosson,

I would like to ask you if there is any plan to support 1D and 2D barcodes in RDLC reports? Currently I am getting System.NotImplemented exeption when RDLC report contains 2D barcode. I am attaching one report as an example.

Thanks for information Regards, Jan

test-report.txt

janslavsky avatar Mar 29 '24 06:03 janslavsky

It looks like your report uses custom item types provided by external component. I don't think it is supported in original ReportViewer, only in SSRS. Does your report work when you use original Microsoft.ReportViewer.WinForms package and .NET Framework?

As for barcodes in reports - I use ZXing.Net to generate images and pass them as base64-encoded-png strings in dataset.

lkosson avatar Mar 29 '24 07:03 lkosson

You can use the image element to display barcodes or QR codes in the report. Add a image element to the report and set the value to the below: =Code.GenerateQRCode(Fields!MaterialCode.Value)

Then under Report Properties --> Code, add the below custom code:

Public Function GenerateQRCode(ByVal inputString As String) as Byte()
     Return QRCoder.BitmapByteQRCodeHelper.GetQRCode(inputString, QRCoder.QRCodeGenerator.ECCLevel.Q, 2)
End Function

This uses the QRCoder library project to display the QRCode. Make sure to reference it under Report Properties --> References and in your project.

Sample report: IPASPicking.zip

dineshmike avatar Mar 29 '24 15:03 dineshmike