BarCodeWiz Logo

UPC EAN Barcodes in Crystal Reports

  • This tutorial shows how to add UPC EAN barcodes to your Crystal Reports.
  • See the video or simply follow the steps below.

Step 1. Add a new formula

  • Open the field Explorer: View > Field Explorer

  • Select Formula Fields and click on New

  • Enter a name for the new formula.

Step 2. Locate the UPC EAN Functions

  • Ensure the functions are installed. May be listed under one of these three locations:
    Functions > Additional Functions
    Functions > Additional Functions > Visual Basic UFLs (u2lcom.dll)
    Functions > Additional Functions > COM and .NET UFLs (u212com.dll)
  • Enter the function name and argument into the editor:
    UPCA ({Items.item_barcode})
  • If your data field is numeric, it should be convert to text:
    UPCA (ToText({Items.item_price}, 0, ''))

Step 3. Add a barcode to the report

  • Drag the formula from Field Explorer to the report

  • Change the font properties to:
    Font Name: BCW_UPCEAN_1
    Font Size: 24

The report is now ready

  • Click on Preview to see or print it.

UPC EAN Fonts Functions in Crystal Reports


UPCA(barcode as String)

  • Encodes the barcode in UPC-A format.
  • The function parameters are:

    barcode: String value with the barcode data to encode. Must be 11 or 12 digits. Enter 11 digits to have the check digit added automatically. Also accepts 13, 14, 15, or 17 digits for +2 and +5 Add-on

UPCE(barcode as String)

  • Encodes the barcode in UPC-E format.
  • The function parameters are:

    barcode: String value with the barcode data to encode. Must be 7 or 8 digits. Requires leading zero. Enter 7 digits to have the check digit added automatically. Also accepts 9,10, 12, or 13 digits for +2 and +5 Add-on.

EAN13(barcode as String)

  • Encodes the barcode in EAN-13 format.
  • The function parameters are:

    barcode: String value with the barcode data to encode. Must be 12 or 13 digits. Enter 12 digits to have the check digit added automatically. Also accepts 14, 15, 17, or 18 digits for +2 and +5 Add-on

EAN8(barcode as String)

  • Encodes the barcode in EAN-8 format.
  • The function parameters are:

    barcode: String value with the barcode data to encode. Must be 7 or 8 digits. Enter 7 digits to have the check digit added automatically.