Working with Barcodes in .NET Using FlexReport
Tags: webdev, tutorial, dotnet, devops
Published: 2022-12-22 15:28:29

---
canonical_url: https://www.grapecity.com/blogs/working-with-barcodes-in-net-using-flexreport
description: Learn about working with barcodes in your .NET applications using FlexReport. See more from ComponentOne today.
---

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 barcodesare supported in[FlexReport](https://www.grapecity.com/componentone/docs/win/online-flexreport/overview.html), which is implemented via the [**C1.Win.BarCode **](https://www.nuget.org/packages/C1.Win.BarCode)assembly. This blog demonstrates how to add these barcode types in FlexReport using the [_FlexReportDesigner _](https://www.grapecity.com/componentone/docs/win/online-flexreport/flexreport-designer.html)application.

### Adding Barcodes to FlexReport

The **Fields** group under the [_Insert_](https://www.grapecity.com/componentone/docs/win/online-flexreport/InsertTab.html) 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.

![](https://files.grapecity.com/gc-website-media/gn3ibelw/01-barcode.png?width=500&height=269.1807542262679)

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.

![](https://files.grapecity.com/gc-website-media/ql1khsxs/02-barcode.gif?width=500&height=266.6666666666667)

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.

![](https://files.grapecity.com/gc-website-media/hgchamls/03-barcode.png?width=500&height=259.95316159250586)

You can also go through [this](https://www.grapecity.com/componentone/docs/win/online-flexreport/BarcodesinReports.html) 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](https://www.grapecity.com/componentone/docs/win/online-flexreport/C1.Win.C1Document.4.5.2~C1.Win.C1Document.BarcodeOptions~QRCode.html) under [BarcodeOptions](https://www.grapecity.com/componentone/docs/win/online-flexreport/C1.Win.FlexReport.6~C1.Win.FlexReport.BarCodeField~BarcodeOptions.html).

![](https://files.grapecity.com/gc-website-media/3mljljd5/04-barcode.gif?width=500&height=265.177065767285)

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](https://www.grapecity.com/login?return_url=/my-account/my-support) if you face any issues while using Barcode in FlexReport.