Skip to main content Skip to footer

Working with Barcodes in .NET Using FlexReport

A barcode is a machine-readable representation of numerals and characters. It is like a unique fingerprint for a product and is often used for identification and pricing. Originally, barcodes represented data by varying the widths and spacing of parallel lines and may be referred to as linear or one-dimensional (1D).

Later they evolved into rectangles, dots, hexagons, and other geometric patterns in two dimensions (2D) and are known as QR codes. QR codes have higher data limits for which information can be written and scanned.

Both of these forms of barcodes are supported in FlexReport, which is implemented via the C1.Win.BarCode assembly. This blog demonstrates how to add these barcode types in FlexReport using the FlexReportDesigner application.

Ready to Create Your First Barcode? Download ComponentOne Today!

Adding Barcodes to FlexReport

The Fields group under the Insert tab in the C1FlexReportDesigner application provides tools for adding various report fields, like RTF, Checkbox, Picture, FlexChart, and so on, including the BarCodeField. This toolbar is visible only during design time.

When designing a report, you can click on the Barcode field and add it to the report section where you need to show the barcode. By default, its Text property will be set to “BARCODE”. If you're making an unbound report, all you have to do is change the Text property to fit your needs. If you're making an unbound report, all you have to do is change the Text property to fit your needs.

On the other hand, if your report is bound to any data source, you can click on the Text property in the property window and select the data field that you want to bind with the barcode.

In bound mode, you can also directly click on the down arrow sign on the BarCodeField that opens a list and gives the option to select Data-Fields from the attached data source, which will be displayed as a barcode in the report.

There are various types of barcode formats supported by FlexReport, and you may choose from the available options from the BarCode property in the property window.

You can also go through this documentation link to see the supported barcode list and its description.

Adding QR Codes to FlexReport

The Quick Response (QR) Code, also known as a matrix barcode or a two-dimensional code, is a type of barcode that FlexReport gives. You need to include a BarCodeField in your report and change the Barcode property of that field to QRCode. There are two models of QR code, i.e., supported by FlexReport: Model1 and Model2, where model1 is capable of storing up to 1,167 numerals and model2 is capable of storing up to 7,089 numerals. This can be set using the Model property of QRCode under BarcodeOptions.

This way, you can add Barcodes and QR codes to your report layout as per your business need.


Try the C1FlexReportDesigner application and create your first barcode.

Happy Bar-Coding!

Contact our support team on the Support portal if you face any issues while using Barcode in FlexReport. 

Ready to Create Your First Barcode? Download ComponentOne Today!

comments powered by Disqus