Bar Code
- Last UpdatedMar 30, 2022
- 11 minute read
The Bar Code control is used to add bar code into a report.

Note:
The barcode quality can degrade when the report is exported to formats other than
PDF. To ensure reliable barcode recognition, print the report directly from an application
using the native printing methods.
The Module and Auto-Module properties of a control should be used with care.
In the Property Grid, the Bar Code control's properties are divided into the following groups.
Appearance
Alignment
Determines the alignment of the barcode image within the control. To define the text alignment, use the Text Alignment property.
Background Color
Specifies the background colour for the controls contained within the band. This option
is also available on the Formatting Toolbar (
).
Border Color, Border Dash Style, Border Width and Border
Specifies border settings for the control.
Font
Specifies the font settings for the controls contained within the band. Some of these settings are available on the Formatting Toolbar.
Foreground Color
Specifies the text colour for the controls contained within the band. This option
is also available on the Formatting Toolbar (
).
Formatting Rules
Displays the Formatting Rules Editor which enables users to choose which rules should be applied to the band during report generation, and define the precedence of the applied rules. For further information, refer to Conditionally Change a Control's Appearance.

Padding
Specifies indent values which are used to render the contents of a Bar Code.
Style Priority
Defines the priority of various styles (for example, background colour or border colour). For further information on style inheritance, refer to Styles Concepts.
Styles
Defines odd and even styles for the controls, as well as assigning an existing style to the them (or a newly created one). For further information on style inheritance, refer to Styles Concepts.
Text Alignment
Used to change the alignment of the control's text. This option is also available on the Formatting Toolbar. To define the alignment of the barcode image, use the Alignment property.
Behaviour
Anchor Vertically
Specifies the vertical anchoring style of the control, so that after page rendering it stays attached to the top control, bottom control, or both. The property setting is useful for data-bound controls located between upper and lower controls, which are able to resize depending on their contents.
Auto-Module
When this property is set to Yes, the Barcode image is stretched to fit the entire control's width. When this option is set to No, this behaviour is determined by the Module property.
Keep Together
Specifies whether the contents of the control can be horizontally split across pages. In other words, if the control occupies more space than remains on the page, this property specifies whether this Bar Code should be split between the current page and the next, or whether it will be printed entirely on the next page. If a control does not fit on the next page either, then the Bar Code will be split despite this property's setting.
Module
Specifies the width of the narrowest bar or space in the barcode, in report measurement units. Set this property to Yes for automatic adjustment of its value when the control is resized.
Note:
If the Module property is set too low, the barcode output may be unreadable by a barcode scanner.
If the Auto-Module property is set to No, the barcode image could be generated with the setting of Module property is larger than the control itself. In this case, the control displays a warning, as illustrated below:

Increase the dimensions of the control to resolve this.
Orientation
The barcode image within the control can be rotated using the Orientation property to specify one of four possible orientations (Normal, Upside Down, Rotate to the Left and Rotate to the Right).
Scripts
This property contains events, which can be handled with the scripts. For further information on scripting, refer to Handle Events via Scripts.
Show Text
Determines whether to display the numerical value, or only the Barcode within the control.
Symbology
The Symbology property defines the mapping between Barcode text and an image. The Bar Code control supports only linear 1D symbologies. They are listed in the following table:
|
Symbology |
Description |
|---|---|
|
Codabar |
The Codabar is an old format that uses discrete, self-checking symbology, capable of encoding 16 different characters, plus an additional 4 start/stop characters. Users should also specify the Start and Stop Symbols and Wide Narrow Ratio properties. |
|
Code11 |
Code 11, also known as USD-8, was developed as a high-density numerical-only symbology. The symbology is discrete, and is able to encode the numbers 0 through to 9, the dash symbol (-), and start/stop characters. |
|
Code128 |
Code 128 has been widely implemented. It is a high-density symbology which permits encoding messages of arbitrary lengths of any character of the ASCII character set. The symbology includes a checksum digit for verification. Users should also specify the Character Set. The recommended setting is Auto Charset. |
|
Code39 |
Code 39 is also known as 3 of 9 Code and USD-3. It can encode uppercase letters (A through Z), digits (0 through 9) and several special characters like the $ sign. The Calculate a Checksum and Wide Narrow Ratio (which should be in a range of 2.2 -3) properties can also be specified. |
|
Code39Extended |
This is an extension of Code 39, also known as Full ASCII Code 39 . It is capable of encoding all 128 ASCII characters. The Calculate a Checksum and Wide Narrow Ratio (which should be in a range of 2.2 -3) properties can be specified. |
|
Code93 |
Code 93 was designed to supplement and improve Code 39. It is an alphanumeric, variable length symbology, providing higher reliability and density than Code 39. The Calculate a Checksum property can be specified. |
|
Code93Extended |
It enables encoding of all 128 ASCII characters using Code 93's Full ASCII Mode . This is accomplished by using the ($), (/), (%), and (+) symbols as shift characters. The Calculate a Checksum property can be specified. |
|
CodeMSI |
MSI symbology, also known as Modified Plessey, is a low-density, numerical only symbology. To specify the checksum, use the MSI Checksum property. It can be set to None, Modulo 10 and Double Modulo 10. |
|
DataMatrix |
Data Matrix ECC200 code is a two-dimensional matrix barcode consisting of black and while cells arranged in a square or a rectangular pattern. The encoded information can be text or raw data. |
|
EAN128 |
UCC/EAN-128 symbology has the newer name GS1-128. It is based on the Code128 standard, additionally specifying the Application Identifiers for data sections within the code. It includes best before dates, batch numbers, quantities, weights and other attributes. The Character Set property can be specified (Auto Charset is the recommended value). The FNC1 Functional Character property defines a symbol that is not included in a bar code when met in text, but used to generate the application identifiers. The Human-Readable Text property, when set to Yes, inserts parentheses into the text below the bar code for better readability. |
|
EAN13 |
The EAN-13 barcode contains 13 digits, no letters or other characters. The first two or three digits represent the country. The leading zero actually signifies the USA, and UPC-A coding. The last digit is the checksum digit. The control calculates it automatically and it should not be present in the control's text string. So, make sure that the text for this symbology contains no more than 12 digits. If fewer digits are supplied, the string is padded with zeroes on the left. |
|
EAN8 |
EAN-8 is a shortened version of the EAN-13 code. It includes a 2 or 3 digit country code, 4 of 5 data digits (depending on the length of the country code), and a checksum digit. The control calculates the checksum digit automatically and it should not be present in the control's text string. So, make sure that the text for this symbology contains no more than 7 digits. If fewer digits are supplied, the string is padded with zeroes on the left. |
|
Industrial2of5 |
The Industrial (or non-interleaved) 2 of 5 code is a numerical, low-density symbology, based on two-out-of-five code. The Calculate a Checksum and Wide Narrow Ratio (which should be greater than or equal to 2.5) properties can be specified. |
|
Intelligent Mail |
The Intelligent Mail (IM) code is a 65-bar code for use on mail in the United States. The Intelligent Mail barcode is a height-modulated barcode that encodes up to 31 decimal digits of mail-piece data into 65 vertical bars. |
|
Interleaved2of5 |
The Interleaved 2 of 5 code is a higher-density numerical symbology, based on two-out-of-five code. The Calculate a Checksum and Wide Narrow Ratio (which should be greater than or equal to 2.5) properties can be specified. |
|
Matrix2of5 |
A variant of non-interleaved 2 of 5 code. It is a numerical only symbology. The Calculate a Checksum and Wide Narrow Ratio (which should be greater than or equal to 2.5) properties can be specified. |
|
PDF417 |
This Portable Data File symbology is used in a variety of applications, and can also be used to generate postage accepted by the United States Postal Service. It consists of a variable number of rows, each of which is like a small linear bar code. Among other options, the Error Correction Level specifies the amount of redundancy, to protect a barcode's legibility. |
|
PostNet |
This symbology is used by the United States Postal Service to assist in directing mail. The code usually contains the zip-code and delivery point number. Unlike most other barcodes, PostNet actually encodes data in the height of the bars. |
|
QR Code |
QR (Quick Response) Code is a popular two-dimensional matrix barcode that consists of black modules arranged in a square pattern on a white background. |
|
UPCA |
The UPC-A barcode contains 12 digits, no letters or other characters. The first digit is the prefix signifying the product type. The last digit is the check digit . The check digit is calculated using the first eleven figures when the barcode is constructed. So, for a correct UPC-A, make sure that the text contains no more than 11 digits. If there are fewer than 11, the string is padded with zeroes on the left. |
|
UPCE0 |
This symbology is a variation of UPC-A which allows for a more compact barcode by eliminating extra zeros. The first digit is always zero; the last digit is a checksum digit of the original UPC-A code. Not every UPC-A code can be transformed into UPC-E0. For example,, the control's text string 4210000526 is displayed by UPC-E0 symbology as 04252614 and represents the 042100005264 UPC-A code (check digit included). |
|
UPCE1 |
This symbology is a variation of UPC-A, which allows for a more compact barcode by eliminating extra zeros. The first digit is always 1, and the last digit is a checksum digit of the original UPC-A code. Not every UPC-A code can be transformed into UPC-E1. For example, the control's text string 4210000526 is displayed by UPC-E1 symbology as 14252611 and represents the 142100005261 UPC-A code (check digit included). |
|
UPCSupplemental2 |
This is a supplemental two-digit barcode. Make sure that the control's text string contains two digits. |
|
UPCSupplemental5 |
This is a supplemental five-digit barcode, usually used to indicate the suggested retail price of a book. Make sure that the control's text string contains five digits. |
Visible
Specifies whether the control is visible when using the print preview.
Data
(Data Bindings)
If the current report is bound to data, the property is used to bind control properties (Bookmark, Navigation URL, Tag and Text) to a data field obtained from the report data source, and to apply a format string. For further information, refer to Display Values from a Database (Bind Report Elements to Data).
Tag
Adds additional information to a report, for example, the id, by which the report can then be accessible via scripts.
If the current report has a data source, the Tag property can be bound to a data field obtained from the data source. To do this, expand the (Data Bindings) property and from the Tag.Binding dropdown list, select the required data field.
Text
Used to define a string to be encoded as a barcode. Whether or nor this value is displayed within the control is specified using the Show Text property.
Note:
When a control is selected in the designer, the user may start typing the text, and
it will be automatically entered into the in-place editor.
If the content does not conform to the rules of the specified symbology (determined by the Symbology property), the control may display a warning, as in the picture below, or automatically correct the input string by padding it with zeroes or only accepting an acceptable number of characters for display.

If the current report has a data source, the Text property can be bound to a data field obtained from the data source. To do this, expand the (Data Bindings) property, and in the Text.Binding dropdown menu, select the required data field. For further information, refer to Display Values from a Database (Bind Report Elements to Data).
Design
(Name)
Determines a control's name, by which it can be accessed in the Property Grid and by scripts.
Layout
Location
Specifies the location of the control in report measurement units.
Size
Specifies the control's size, in report measurement units.
Snap Line Margin
Specifies the margins for the control, which are maintained when the control is aligned using snap lines.
Navigation
Bookmark and Parent Bookmark
These properties are used to create a hierarchical structure within a report called a document map.
If the current report has a data source, the Bookmark property can be bound to a data field obtained from the data source. To do this, expand the (Data Bindings) property and from the Bookmark.Binding dropdown list, select the required data field.
For further information, refer to Add Bookmarks.
Navigation URL and Navigation Target
Use the Navigation URL property to specify a URL for web browser navigation when a user clicks the control. The web browser displays a page in a window or a frame as specified by the Navigation Target property.
Note:
A URL should have an appropriate prefix (for example, 'http://'). Cross references
can be created within the report by assigning the name of the target control to the
Navigation URL property, and setting the Navigation Target property to _self. For further information, refer to Create Hyperlinks.
If the current report has a data source, the Navigation URL property can be bound to a data field obtained from the data source. To do this, expand the (Data Bindings) property and from the Navigation URL.Binding dropdown menu, select the required data field.