ActiveReports 9 > 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, direction, color, background color, bar width, 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. |
BarWidth | Set the width, in inches, of the barcode's narrow bars. Setting the width to 0 expands the barcode to fit the control. The width ratio is 1 to 0.012 inches. So setting the BarWidth to 2 will have a value of 0.024 inches, while a value of 10 yields a bar width of 0.12 inches for the narrowest bars. |
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.
|
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. |
Direction | Specify the print direction of the barcode symbol. Select from LeftToRight (the default value), RightToLeft, TopToBottom, or BottomToTop. |
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.
|
MicroPDF417 |
MicroPDF417 Options only apply to the MicroPDF417 barcode style.
|
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 in pixel for SectionReports and in point/inch/cm for PageReports. |
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.
|
QRCode |
QRCode Options only apply to the barcode style QRCode.
|
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:
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.
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). If there are only 12 numbers in the string, it calculates a checksum and adds it to the thirteenth position. If there are 13, it validates the checksum and throws an error if it is incorrect. | |
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:
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.
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.
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 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 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 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 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 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 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 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 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 are available for the RSSExpandedStacked barcode style.
Row Count: Enter the number of the barcode stacked rows.
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.