ActiveReports 10
Barcode (Section Report)
ActiveReports 10 > ActiveReports User Guide > Concepts > Section Report Concepts > Section Report Toolbox > Barcode (Section Report)

The Barcode report control offers 39 different barcode styles to choose from. This saves you the time and expense of finding and integrating a separate component. As with other data-bound report controls, you can bind a barcode to data using the DataField property.

Apart from the barcode style, you can manage the alignment, color, background color, caption position, font, text, and check whether checksum is enabled in the Properties Window. There are more properties available with the Code49, PDF417, and QRCode barcode styles. Click the Barcode to reveal its properties in the Properties window. All of the properties specific to this report control are also available in the Barcode dialog.

Important Properties

The following properties help you to customize the specific barcode you need for your application:

Property Description
Alignment The horizontal alignment of the caption in the control. Select from Near, Center, or Far. See CaptionPosition for vertical alignment.
AutoSize When set to True, the barcode automatically stretches to fit the control.
BackColor Select a background fill color for the barcode.
BarHeight Set the height, in inches, of the barcode's bars. If the bar height exceeds the height of the control, this property is ignored.
CaptionGrouping Gets or sets a value indicating whether to add spaces between groups of characters in the caption to make long numbers easier to read. This property is only available with certain styles of barcode, and is ignored with other styles.
CaptionPosition The vertical alignment of the caption in the control. Select from None, Above, or Below. See Alignment for horizontal alignment. None is selected by default, and no caption is displayed.
CheckSumEnabled Some barcode styles require a checksum and some have an optional checksum. CheckSumEnabled has no effect if the style already requires a check digit or if the style does not offer a checksum option.
Code128 Code128 has three settings that work in conjunction: Dpi, BarAdjust, and ModuleSize. This property only applies to the barcode style EANFNC1. You can improve the readability of the barcode by setting all three properties.
  • Dpi sets the printer resolution. Specify the resolution of the printer as dots per inch to create an optimized barcode image with the specified Dpi value. 
  • BarAdjust sets the adjustment size by dot units, which affects the size of the module and not the entire barcode.
  • ModuleSize sets the horizontal size of the barcode module.
Code49 Code49 options include Grouping and Group.  If Grouping is set to True, any value not expressed by a single barcode is expressed by splitting it into several barcodes, and the Group property may be set to a number between 0 and 8.  The default values are False and 0, respectively. When the Group property is set to 2, the grouped barcode's second symbol is created. When invalid group numbers are set, the BarCodeDataException is thrown.
DataMatrix DataMatrix options include EccMode, Ecc200SymbolSize, Ecc200EncodingMode, Ecc000_140SymbolSize, StructuredAppend, StructureNumber, and FileIdentifier. Select from supplied values, or enter a number for the StructureNumber and FileIdentifier.
Font Set the font for the caption. Only takes effect if you set the CaptionPosition property to a value other than None.
ForeColor Select a color for the barcode and caption.
GS1Composite GS1Composite Options only apply to the barcode styles RSS14Stacked and RSSLimited.
  • Type sets the composite symbol type.
  • Value sets the CCA character data.
MicroPDF417 MicroPDF417 Options only apply to the MicroPDF417 barcode style.
  • CompactionMode sets the type of the compaction mode. The possible values are Auto (default), TextCompactionMode, NumericCompactionModeor ByteCompactionMode.
  • FileID sets the file id of the structured append symbol. The valid value is from 0 to 899.
  • SegmentCount sets the segment count of the structured append symbol. The valid value is from 0 to 99999.
  • SegmentIndex sets the segment index of the structured append symbol. The valid value is from 0 to 99998, and less than the value in Segment Count.
  • Version sets the symbol size.
NarrowBarWidth

Also known as the X dimension, this is a value defining the width of the narrowest part of the barcode. Before using an extremely small value for this width, ensure that the scanner can read it. This value is specified in pixels (for example, 10 pixels).

NWRatio Also known as the N dimension, this is a value defining the multiple of the ratio between the narrow and wide bars in symbologies that contain bars in only two widths. For example, if it is a 3 to 1 ratio, this value is 3.
PDF417 PDF417 Options only apply to the barcode style PDF417.
  • Column sets column numbers for the barcode. Values for this property range from 1 to 30. The default value is -1 which automatically determines row numbers.
  • ErrorLevel sets the error correction level for the barcode. Values range between 0 and 8. The error correction capability increases as the value increases. With each increase in the ErrorLevel value, the size of the barcode increases. The default value is -1 for automatic configuration.
  • Row sets row numbers for the barcode. Values range between 3 and 90. The default value is -1 which automatically determine row numbers.
  • Type sets the barcode type to Normal or Simple. Simple is the compact type in which the right indicator is neither displayed nor printed.
QRCode QRCode Options only apply to the barcode style QRCode.
  • Connection allows any value which cannot be expressed by a single barcode to split into several barcodes. This property is used in conjunction with the ConnectionNumber property. 
  • ConnectionNumber Use this property with the Connection property to set the number of barcodes it can split into. Values between 0 and 15 are valid. An invalid number raises the BarCodeData Exception.
  • ErrorLevel values are L (7% restorable), M (15% restorable), Q (25% restorable), and H (30% restorable). The higher the percentage, the larger the barcode becomes.
  • Mask is used to balance brightness and offers 8 patterns in the QRCodeMask enumeration. The default value is Auto, which sets the masking pattern automatically, and is recommended for most uses.
    • Mask000 (i+j) mod 2 = 0
    • Mask001 i mod 2 = 0
    • Mask010 j mod 3 = 0
    • Mask011 (i+j) mod 3 = 0
    • Mask100 (( i div 2)+(j div 3)) mod 2 = 0
    • Mask101 (ij) mod 2 + (ij) mod 3 = 0
    • Mask110 ((ij) mod 2 +(ij) mod 3) mod 2 = 0
    • Mask111 ((ij)mod 3 + (i+j) mod 2) mod 2 = 0
  • Model sets Model1, the original model, or Model2, the extended model.
  • Version indicates the size of the barcode. As the value increases, the barcode's size increases, enabling more information to be stored. Specify any value between 1 and 14 when the Model property is set to Model1 and 1 to 40 for Model2.  The default value is -1, which automatically determines the version most suited to the value.
QuietZone Sets an area of blank space on each side of a barcode that tells the scanner where the symbology starts and stops. You can set separate values for the Left, Right, Top, and Bottom.
Rotation Sets the amount of rotation to use for the barcode. You can select from None, Rotate90Degrees, Rotate180Degrees, or Rotate270Degrees.
RssExpandedStacked Sets the number of stacked rows to use.
Style Sets the symbology used to render the barcode. See the table below for details about each style.
SupplementOptions Sets the 2/5-digit add-ons for EAN/UPC symbologies. You can specify Text, DataField, BarHeight, CaptionPosition, and Spacing for the supplement.
Text Sets the value to print as a barcode symbol and caption. ActiveReports fills this value from the bound data field if the control is bound to the data source.

Limitations

Some barcode types may render incorrectly and contain white lines in the Html and RawHtml views. However, this limitation does not affect printing and scanning. The list of barcode types that may render with white lines in the Html and RawHtml views:

Barcode Dialog

With the control selected on the report, in the Commands section at the bottom of the Properties window, you can click the Property dialog command to open the dialog.

General

Name: Enter a name for the control that is unique within the report. This name is displayed in the Document Outline and in XML exports.

Tag: Enter a string that you want to persist with the control. If you access this property in code, it is an object, but in the Properties window or Property dialog, it is a string.

Visible: Clear this check box to hide the control.

DataField: Select a field from the data source to bind to the control.

Text: Enter static text to show in the textbox. If you specify a DataField value, this property is ignored.

Autosize: Clear this check box to prevent the barcode from automatically resizing to fit the control.

Caption

Location: Select a value to indicate whether and where to display a caption for the barcode. You can select from Above, Below, or None.

Text alignment: Select a value to indicate how to align the caption text. You can select from Center, Near, or Far.

Barcode Settings

Style: Enter the type of barcode to use. ActiveReports supports all of the most popular symbologies:

Table of all included symbologies

Notes: The RSS and QRCode styles have fixed height-to-width ratios. When you resize the width, the height is automatically calculated.

When you choose a style that offers supplemental options, the additional options appear below.

Symbology Name Example Description
Ansi39 ANSI 3 of 9 (Code 39) uses upper case, numbers, - , * $ / + %. This is the default barcode style.
Ansi39x ANSI Extended 3 of 9 (Extended Code 39) uses the complete ASCII character set.
Codabar Codabar uses A B C D + - : . / $ and numbers.
Code_128_A Code 128 A uses control characters, numbers, punctuation, and upper case.
Code_128_B Code 128 B uses punctuation, numbers, upper case and lower case.
Code_128_C Code 128 C uses only numbers.
Code_128auto Code 128 Auto uses the complete ASCII character set.  Automatically selects between Code 128 A, B and C to give the smallest barcode.
Code_2_of_5 Code 2 of 5 uses only numbers.
Code_93 Code 93 uses uppercase, % $ * / , + -,  and numbers.
Code25intlv Interleaved 2 of 5 uses only numbers.
Code39 Code 39 uses numbers, % * $ /. , - +, and upper case.
Code39x Extended Code 39 uses the complete ASCII character set.
Code49 Code 49 is a 2D high-density stacked barcode containing two to eight rows of eight characters each. Each row has a start code and a stop code. Encodes the complete ASCII character set.
Code93x Extended Code 93 uses the complete ASCII character set.
DataMatrix Data Matrix is a high density, two-dimensional barcode with square modules arranged in a square or rectangular matrix pattern.
EAN_13 EAN-13 uses only numbers (12 numbers and a check digit). It takes only 12 numbers as a string to calculate a check digit (CheckSum) and add it to the thirteenth position. The check digit is an additional digit used to verify that a bar code has been scanned correctly. The check digit is added automatically when the CheckSumEnabled property is set to True.
EAN_13 with the add-on code EAN-13 may include the add-on code to the right of the main code. The add-on code may include up to 5 supplemental characters.
EAN_8 EAN-8 uses only numbers (7 numbers and a check digit).
EAN128FNC1 EAN-128 is an alphanumeric one-dimensional representation of Application Identifier (AI) data for marking containers in the shipping industry.

This type of bar code contains the following sections:

  • Leading quiet zone (blank area)
  • Code 128 start character
  • FNC (function) 1 character which allows scanners to identify this as an EAN-128 barcode
  • Data (AI plus data field)
  • Symbol check character (Start code value plus product of each character position plus value of each character divided by 103. The checksum is the remainder value.)
  • Stop character
  • Trailing quiet zone (blank area)

The AI in the Data section sets the type of the data to follow (i.e. ID, dates, quantity, measurements, etc.). There is a specific data structure for each type of data. This AI is what distinguishes the EAN-128 code from Code 128.

Multiple AIs (along with their data) can be combined into a single bar code.

EAN128FNC1 is a UCC/EAN-128 (EAN128) type barcode that allows you to insert FNC1 character at any place and adjust the bar size, etc., which is not available in UCC/EAN-128.

To insert FNC1 character, set “\n” for C#, or “vbLf” for VB to Text property at runtime.

IntelligentMail Intelligent Mail, formerly known as the 4-State Customer Barcode, is a 65-bar code used for domestic mail in the U.S.
JapanesePostal This is the barcode used by the Japanese Postal system. Encodes alpha and numeric characters consisting of 18 digits including a 7-digit postal code number, optionally followed by block and house number information. The data to be encoded can include hyphens.
Matrix_2_of_5 Matrix 2 of 5 is a higher density barcode consisting of 3 black bars and 2 white bars.
MicroPDF417

MicroPDF417 is two-dimensional (2D), multi-row symbology, derived from PDF417. Micro-PDF417 is designed for applications that need to encode data in a two-dimensional (2D) symbol (up to 150 bytes, 250 alphanumeric characters, or 366 numeric digits) with the minimal symbol size.

MicroPDF417 allows you to insert an FNC1 character as a field separator for variable length Application Identifiers (AIs).

To insert FNC1 character, set “\n” for C#, or “vbLf” for VB to Text property at runtime.

MSI MSI Code uses only numbers.
Pdf417 Pdf417 is a popular high-density 2-dimensional symbology that encodes up to 1108 bytes of information. This barcode consists of a stacked set of smaller barcodes. Encodes the full ASCII character set. It has ten error correction levels and three data compaction modes: Text, Byte, and Numeric. This symbology can encode up to 1,850 alphanumeric characters or 2,710 numeric characters.
PostNet PostNet uses only numbers with a check digit.
QRCode QRCode is a 2D symbology that is capable of handling numeric, alphanumeric and byte data as well as Japanese kanji and kana characters. This symbology can encode up to 7,366 characters.
RM4SCC Royal Mail RM4SCC uses only letters and numbers (with a check digit).  This is the barcode used by the Royal Mail in the United Kingdom.
RSS14 RSS14 is a 14-digit Reduced Space Symbology that uses EAN.UCC item identification for point-of-sale omnidirectional scanning.
RSS14Stacked RSS14Stacked uses the EAN.UCC information with Indicator digits as in the RSS14Truncated, but stacked in two rows for a smaller width.
RSS14Stacked allows you to set Composite Options, where you can select the type of the barcode in the Type drop-down list and the value of the composite barcode in the Value field.
RSS14Stacked CCA RSS14Stacked with Composite Component - Version A.
RSS14StackedOmnidirectional RSS14StackedOmnidirectional uses the EAN.UCC information with omnidirectional scanning as in the RSS14, but stacked in two rows for a smaller width.
RSS14Truncated RSS14Truncated uses the EAN.UCC information as in the RSS14, but also includes Indicator digits of zero or one for use on small items not scanned at the point of sale.
RSSExpanded

RSSExpanded uses the EAN.UCC information as in the RSS14, but also adds AI elements such as weight and best-before dates.

RSSExpanded allows you to insert an FNC1 character as a field separator for variable length Application Identifiers (AIs).

To insert FNC1 character, set “\n” for C#, or “vbLf” for VB to Text property at runtime.

RSSExpandedStacked

RSSExpandedStacked uses the EAN.UCC information with AI elements as in the RSSExpanded, but stacked in two rows for a smaller width.

RSSExpandedStacked allows you to insert an FNC1 character as a field separator for variable length Application Identifiers (AIs).

To insert FNC1 character, set “\n” for C#, or “vbLf” for VB to Text property at runtime.

RSSLimited RSS Limited uses the EAN.UCC information as in the RSS14, but also includes Indicator digits of zero or one for use on small items not scanned at the point of sale.
RSSLimited allows you to set Composite Options, where you can select the type of the barcode in the Type drop-down list and the value of the composite barcode in the Value field.
RSSLimited CCA RSS Limited with Composite Component - Version A.
UCCEAN128 UCC/EAN –128 uses the complete ASCII character Set.  This is a special version of Code 128 used in HIBC applications.
UPC_A UPC-A uses only numbers (11 numbers and a check digit).
UPC_A with the add-on code UPC_A may include the add-on code to the right of the main code. The add-on code may include up to 5 supplemental characters.
UPC_E0 UPC-E0 uses only numbers.  Used for zero-compression UPC symbols.  For the Caption property, you may enter either a six-digit UPC-E code or a complete 11-digit (includes code type, which must be zero) UPC-A code.  If an 11-digit code is entered, the Barcode control will convert it to a six-digit UPC-E code, if possible.  If it is not possible to convert from the 11-digit code to the six-digit code, nothing is displayed.
UPC_E0 with the add-on code UPC_E0 may include the add-on code to the right of the main code. The add-on code may include up to 5 supplemental characters.
UPC_E1 UPC-E1 uses only numbers.  Used typically for shelf labeling in the retail environment.  The length of the input string for U.P.C. E1 is six numeric characters.
UPC_E1 with the add-on code UPC_E1 may include the add-on code to the right of the main code. The add-on code may include up to 5 supplemental characters.

Bar Height: Enter a value in inches (for example, .25in) for the height of the barcode.

Narrow Bar Width (also known as X dimension): Enter a value in points (for example, 0.8pt) for the width of the narrowest part of the barcode. Before using an extremely small value for this width, ensure that the scanner can read it.

Tip: For accurate scanning, the quiet zone should be ten times the Narrow Bar Width value.

Narrow Width Bar Ratio: Enter a value to define the multiple of the ratio between the narrow and wide bars in symbologies that contain bars in only two widths. For example, if it is a 3 to 1 ratio, this value is 3. Commonly used values are 2, 2.5, 2.75, and 3.

Quiet Zone

A quiet zone is an area of blank space on either side of a barcode that tells the scanner where the symbology starts and stops.

Left: Enter a size in inches of blank space to leave to the left of the barcode.

Right: Enter a size in inches of blank space to leave to the right of the barcode.

Top: Enter a size in inches of blank space to leave at the top of the barcode.

Bottom: Enter a size in inches of blank space to leave at the bottom of the barcode.

Note: The units of measure listed for all of these properties are the default units of measure used if you do not specify. You may also specify cm, mm, in, pt, or pc.

Checksum

A checksum provides greater accuracy for many barcode symbologies.

Compute Checksum: Select whether to automatically calculate a checksum for the barcode.

Note: If the symbology you choose requires a checksum, setting this value to False has no effect.

Code49 Options

Code49 Options are available for the Code49 barcode style.

Use Grouping: Indicates whether to use grouping for the Code49 barcode. The possible values are True or False.

Group Number: Enter a number between 0 and 8 for the barcode grouping.

DataMatrix Options

DataMatrix Options are available for the DataMatrix barcode style.

EccMode: Select the Ecc mode from the drop-down list. The possible values are ECC000, ECC050, ECC080, ECC100, ECC140 or ECC200.

Ecc200 Symbol Size: Select the size of the ECC200 symbol from the drop-down list. The default value is SquareAuto.

Ecc200 Encoding Mode: Select the encoding mode for ECC200 from the drop-down list. The possible values are Auto, ASCII, C40, Text, X12, EDIFACT or Base256.

Ecc000_140 Symbol Size: Select the size of the ECC000_140 barcode symbol from the drop-down list.

Structured Append: Select whether the barcode symbol is part of the structured append symbols. The possible values are True or False.

Structure Number: Enter the structure number of the barcode symbol within the structured append symbols.

File Identifier: Enter the file identifier of a related group of the structured append symbols. If you set the value to 0, the file identifier symbols are calculated automatically.

EAN Supplementary Options

EAN Supplementary Options are available for the EAN_13 and EAN_8 barcode styles.

Supplement DataField: Select the data field for the barcode supplement.

Supplement Value: Enter the expression to set the value of the barcode supplement.

Caption Location: Select the location for the supplement caption from the drop-down list. The possible values are None, Above or Below.

Supplement Bar Height: Enter the bar height for the barcode supplement.

Supplement Spacing: Enter the spacing between the main and the supplement barcodes.

EAN128FNC1 Options

EAN128FNC1 Options are available for the EAN128FNC1 barcode style.

DPI: Specify the printer resolution.

Module Size: Enter the horizontal size of the barcode module.

Bar Adjust: Enter the adjustment size by dot units, which affects the size of the module and not the entire barcode.

GS1Composite Options

GS1Composite Options are available for the RSS14Stacked and RSSLimited barcode styles.

Type: Select the type of the composite barcode from the drop-down list. The possible values are None or CCA. CCA (Composite Component - Version A) is the smallest variant of the 2-dimensional composite component. 

Value: Enter the expression to set the value of the composite barcode.

MicroPDF417 Options

MicroPDF417 Options are available for the MicroPDF417 barcode style.

Compaction Mode: Select the type of the compaction mode from the drop-down list. The possible values are Auto, TextCompactionMode, NumericCompactionMode, or ByteCompactionMode.

Version: Select the version from the drop-down box to set the symbol size.

Segment Index: The segment index of the structured append symbol. The valid value is from 0 to 99998, and less than the value in Segment Count.

Segment Count: The segment count of the structured append symbol. The valid value is from 0 to 99999.

File ID: The file id of the structured append symbol. The valid value is from 0 to 899.

PDF417 Options

PDF417 Options are available for the Pdf417 barcode style.

Columns: Enter column numbers for the barcode.

Rows: Enter row numbers for the barcode.

Error Correction Level: Enter the error correction level for the barcode.

PDF 417 Barcode Type: Select the PDF417 barcode type form the drop-down list. The possible values are Normal or Simple.

QRCode Options

QRCode Options are available for the QRCode barcode style.

Model: Select the model for the QRCode barcode style from the drop-down list. The possible values are Model1 or Model2.

ErrorLevel: Select the error correction level for the barcode from the drop-down list. The possible values are M, L, H or Q.

Version: Enter the version of the QRCode barcode style.

Mask: Select the pattern for the barcode masking form the drop-down list.

Use Connection: Select whether to use the connection for the barcode. The possible values are True or False.

ConnectionNumber: Enter the connection number for the barcode.

Encoding: Select the barcode encoding from the drop-down list.

RssExpandedStacked Options

RssExpandedStacked Options are available for the RSSExpandedStacked barcode style.

Row Count: Enter the number of the barcode stacked rows.

UPC Supplementary Options

UPC Supplementary Options are available for the UPC_A, UPC_E0 and UPC_E1 barcode styles.

Supplement DataField: Select the data field for the barcode supplement.

Supplement Value: Enter the expression to set the value of the barcode supplement.

Caption Location: Select the location for the supplement caption from the drop-down list. The possible values are None, Above or Below.

Supplement Bar Height: Enter the bar height for the barcode supplement.

Supplement Spacing: Enter the spacing between the main and supplement barcodes.

Appearance

Fore color: Select a color to use for the bars in the barcode.

Background color: Select a color to use for the background of the control.

Rotation: Select a value indicating the degree of rotation to apply to the barcode. You can select from None, Rotate90Degrees, Rotate180Degrees, or Rotate270Degrees.

Font

Name: Select a font family name to use for the caption.

Size: Choose the size in points for the font.

Style: Choose from Normal or Italic.

Weight: Choose from Normal or Bold.

Decoration: Select check boxes for Underline and Strikeout.

GDI Charset: Enter a value to indicate the GDI character set to use. For a list of valid values, see MSDN Font.GDICharSet Property.

GDI Vertical: Select this checkbox to indicate that the font is derived from a GDI vertical font.