Reporting

The BarCode report item is used for automatic BarCode generation directly from a numeric or character data without need of any BarCode font being installed in the end user’s PC. The screenshot below shows a BarCode report item on a report at design-time:

 

The following figure illustrates how the value of the BarAlign property affects the appearance of the BarCode report item when Stretch is set to false:

When the ShowText property is set to true, the placement of the text around the BarCode can be controlled by the TextAlign and VerticalAlign properties of the Style property. The figure below shows different combinations of values for the TextAlign and VerticalAlign properties and how they affect the final appearance of the BarCode report item.

 

Symbology Specifications

BarCodeDescription

Codabar

(aka Ames Code/USD-4/NW-7/2 of 7 Code): Used in libraries and blood banks

Code 11

(USD-8): Used to identify telecommunications equipment

Code 25 Standard

Used in airline ticket marking, photofinishing

Code 25 Interleaved

Used in warehouse, industrial applications

Code 39

(aka USD-3, 3 of 9): U.S. Government and military use, required for DoD applications

Code 39 Extended

(aka USD-3, 3 of 9): U.S. Government and military use, required for DoD applications, supports full ASCII

Code 93

(aka USS-93): Compressed form of Code 39

Code 93 Extended

(aka USS-93): Compressed form of Code 39, supports full ASCII

Code 128

Very dense code, used extensively worldwide

Code 128 A

Subset of Code 128  *(more info below)

Code 128 B

Subset of Code 128  *(more info below)

Code 128 C

Subset of Code 128  *(more info below)

MSI

Variation of Plessey code, with similar applications

EAN 8

Short version of EAN-13, 8 characters

EAN 13

Used with consumer products internationally, 13 characters

GS1-128

Formerly known as UCC-128 and EAN-128. Used to encode shipping/product information  *(more info below)

Postnet

Printed by U.S. Post Office on envelopes

UPC A

Used with consumer products in U.S., 12 characters

UPC E

Short version of UPC symbol, 6 characters

UPC Supplement 2

Used to indicate magazines and newspaper issue numbers

UPC Supplement 5

Used to mark suggested retail price of books

Additional information on Code128

  1. Code128A, Code128B and Code128C represent the A, B and C subsets of the Code128 symbology. Code128 uses an intelligent algorithm that picks automatically the appropriate subset according to the input value, and might switch between these subsets in the middle of a BarCode in order to produce a shorter generated sequence. For example, if you have the input string “ABCD1234”, the “ABCD” part of the string will be encoded using the A subset, while the “1234” part will be encoded with the C subset, because Code128C uses a double-density code for numerical values, thus producing a shorter BarCode as a result. If you want to disable this behavior you can specify explicitly one of the subsets: Code128A, Code128B or Code128C to the Symbology property of the BarCode report item.
  2. Code128 can represent both ASCII characters and non-ASCII control characters. Normally the BarCode report item inserts automatically the appropriate control characters in order to conform to the Code128 specification. However certain applications might require manual insertion of certain control characters, such as the functional characters: FNC1-FNC4. For this purpose the BarCode report item assigns special Unicode values to these control characters outside the normal 0-127 ASCII code range. The following table lists all Code128 control characters and their corresponding Unicode values:
Code 128 Control Characters

Control Character

Hexadecimal

Decimal

Code A

F4

244

Code B

F5

245

Code C

F6

246

FNC1

F7

247

FNC2

F8

248

FNC3

F9

249

FNC4

FA

250

Shift

FB

251

Start A

FC

252

Start B

FD

253

Start C

FE

254

Stop

FF

255

For example, the following code inserts the FNC4 control character in the middle of a BarCode:

CopyC#
BarCode1.Value = "ABCD" + "\u00FA" + "1234";
CopyVB.NET
BarCode1.Value = "ABCD" & ChrW(&HFA) & "1234"

Additional information on GS1-128

GS1-128 is a special case of Code128. The only difference between GS1-128 and Code 128 is that GS1-128 inserts the FNC1 control character at the beginning of the BarCode in order to conform to the GS1-128 specification. If you have a multi-part GS1-128 BarCode which requires the FNC1 control character as a delimiter between the different parts, you should insert it manually:

CopyC#
BarCode1.Value = "1234" + "\u00F7" + "5678";
CopyVB.NET
BarCode1.Value = "1234" & ChrW(&HF7) & "5678"

See Also