Barcode Fonts, Components, ActiveX and .NET Windows Forms Controls, Java Servlets, 
DLLs and Barcode Scanners., Inc., Computers Hardware, Software & Services, Tampa, FL View your cart in the IDAutomation Store    

Home > Barcode Components > Native Barcode for Crystal Reports > User Manual

Native Barcode Generator in a Crystal ReportNative Crystal Reports User Manual

NOTE: This product supports Crystal version 9 and later. Refer to the Crystal Integration Guide for products that support earlier versions.

Order Native Crystal Reports Barcode Generator Download Demo of Native Crystal Reports Barcode Generator View the release log for the Crystal Reports Native Generator support for Crystal Reports Generator

Reports containing this object may only be distributed outside the licensed organization with the purchase of a Developer License to the Native Barcode Generator.

Product Overview

How to Create Barcodes in Crystal Reports using the Crystal Native Barcode Generator

View Video Full Screen on YouTube

The Native Barcode Generator is an object that may be easily inserted into a Crystal Report to create barcode images. Once installed in a report, no other components or fonts need to be installed to create barcodes; it is the complete barcode generator that stays with the report, even when distributed. *

Supported Barcode Symbologies:

Barcode Integration Tutorial

Installing the Native Barcode Generator is a fairly simple process. Several generators are created for different barcode types.

  1. Extract the files from the Native Barcode Generator package.
  2. Several generators are created for different barcode types. Open the report that represents the barcode type that is needed.
    Extracted Zip File of reports
    If in doubt, IDAutomation recommends choosing Code 128 Auto, which is in the file named IDAutomation Native - Code 128 Auto.rpt.
  3. Choose View - Design to switch to design mode and locate the Native Barcode Generator object within the details section of the report.
    Locate the barcode object to copy.
    The object is the field in the details area that contains very small text.
  4. Highlight the Native Barcode Generator object and choose Edit - Copy
    Insert Native Barcode Object for Crystal Reports
    or Right-Click on the object and select Copy.
    Right Click and Copy Object
  5. Open the report the barcode is needed for and choose Edit - Paste to paste the Native Barcode Generator object where it is desired.
    • When creating GS1 symbols, the text object related to the Barcode Generator object should also be copied, if it is desired to have the text interpretation appear.
      GS1-128 Text and Barcode Object
  6. Highlight the object and choose Edit - Edit Formula.
    Edit Formula
  7. If more than one barcode will be on the same report it is necessary to rename the formula. In the formula workshop right click on the formula name and choose rename. Add a descriptive name to the end, for example: IDAutomation_C128_CustomerData.
  8. Modify the "DataToEncode =" line of the formula to equal the data that is to be encoded in the barcode.
    Enter formula for datatoencode.
    If an error such as "A string is required" appears, the data will need to be converted to a string with a crystal function. For example: DataToEncode = cStr( {Table1_.FloatValueField},0 )
  9. Optionally, parameters below the "DataToEncode =" line of the formula may be changed as necessary.
    • For linear barcodes only, when changing the "BarHeight =" variable, the size of the object must also be increased so that taller barcodes may be contained. The approximate height is determined by the following formula:
        Height in Inches = (Font Size) * (BarHeight) * 0.015
        Height in CM    = (Font Size) * (BarHeight) * 0.04

      For example, the default BarHeight of 8 equals about 0.3 inches and 1 centimeter.
  10. If it is necessary to change the X dimension or barcode size, highlight the object, choose Format Field and change the font point size according to the chart below. The point size must be small, generally 3 or 4 points. Because the drop down box does not contain these small sizes, they must be manually typed in. The font selected for the object must be "Courier New" or another mono-spaced Unicode font such as "Consolas" or "Lucida Console".
    This is how to change the size of the barcode field in Crystal Reports.
    Point Size X Dimension Notes about point size and symbol distortion
    2 08 Mils (.02cm)
    • When using a 203 or 300 dpi thermal printer the point size should be 2.5 or 5 points.
    • To scan from the screen of a Windows PC, the best sizes to use are 10, 12 or 16 points.
    • If distortion is noticed, slightly adjust the point size up or down in .5 increments until a correct symbol is obtained. If the result is still not be as expected, Barcode Fonts should be used instead.
    • The X dimensions are doubled for 2D matrix symbols such as Data Matrix and QR-Code. For example, a QR-Code printed at 5 points will have an X of 40 Mils.
    • The X dimensions are approximate and may change with different resolutions of printers and screens.
    2.5 10 Mils (.025cm)
    3 12 Mils (.03cm)
    4 16 Mils (.04cm)
    5 20 Mils (.05cm)
    6 24 Mils (.06cm)
    7 28 Mils (.07cm)
    8 32 Mils (.08cm)
    9 36 Mils (.09cm)

  11. Run the report to verify barcodes are being properly created. Ensure the object has been sized properly to contain the entire barcode. If the width of the symbol is larger than the object, white lines and a distorted symbol will appear.
    Truncated barcode object
  12. Print the report to verify that the barcodes are created properly and that they can be scanned with a scanner. If a scanner is needed to verify barcodes, IDAutomation offers several affordable, barcode scanner kits including plug-and-play USB scanners.
  13. It is normal to view some distortion of the symbol on the screen because of low screen resolution. However, the barcodes should be accurate when printed. If it is necessary to generate accurate barcodes for the screen, adjust the point size slightly until the symbol appears without any white lines of distortion.
    Crystal Reports Barcode


Each symbology has its own .rpt code example included in the licensed download zip file. This code should be copied and pasted into the Formula Editor and then modified as needed. Below is a list of the symbologies and the parameters associated:

2D Specific:
Symbology Associated .rpt File Parameters (may be modified within the formula)
Code-39 Native - Code 39.rpt DataToEncode, BarHeight, N_Dimension and IncludeCheckDigit
Code 93 Native - Code 93.rpt DataToEncode and BarHeight
Codabar Native - Codabar.rpt DataToEncode, BarHeight, N_Dimension, CodabarStart and CodabarStop
Code-128 Auto Native - Code 128 Auto.rpt DataToEncode, BarHeight and ApplyTilde
Code 128 A Native - Code 128 A.rpt DataToEncode and BarHeight
Code 128 B Native - Code 128 B.rpt DataToEncode and BarHeight
Code 128 C Native - Code 128 C.rpt DataToEncode and BarHeight
GS1 DataBar Native - GS1 DataBar.rpt DataToEncode, BarHeight (Should be either 13, 24 or 34) and Segs
Interleaved 2-of-5 Native - Interleaved 2 of 5.rpt DataToEncode, BarHeight, N_Dimension and IncludeCheckDigit
MSI Native - MSI.rpt DataToEncode, BarHeight, N_Dimension and IncludeCheckDigit
Data Matrix Native - DataMatrix.rpt DataToEncode, processTilde, PreferredFormat and EncodingMode
PDF417 Native - PDF417.rpt DataToEncode, EccLevel, ColumnSpecify, RowSpecify and PDFTruncate
QR-Code Native - QR-Code.rpt DataToEncode, ProcTilde, Version, EncMode and ErrorCorrectionLevel
USPS Intelligent Mail (IMb) Native - USPS IntelligentMail.rpt DataToEncode As String
USPS Postnet Native - Postnet.rpt DataToEncode and IncludeCheckDigit

Technical Support

Forum support for Crystal Reports Generator
View the release log for the Crystal Reports Native Generator

Free product support may be obtained by reviewing the knowledgebase articles that are documented below and by searching resolved public forum threads. Priority phone, email and forum support is also provided within 30 days of purchase. Additional phone, email and forum support is provided with an active Priority Support and Upgrade Subscription.

Popular Forum Post Resolutions:
Common Problems and Solutions:

* Due to limitations within Crystal Reports formulas, complex barcode types such as the USPS Intelligent Mail, require the installation of the IDAutomation UFL (version 2015 or later) to perform most of the complex calculations required for proper barcode generation. Installation of this UFL is automatic when running the installer for this product. In addition, a silent installer is provided with all developer licenses of this product to easily install the UFL when distributing reports.

Back to Top

 ©Copyright 2019, All Rights Reserved. Legal Notices.

 Barcode Fonts | Components | Scanners | Support | Contact Us

Training Videos on YouTube  Join us on LinkedIn  Follow us on Twitter  Like us on Facebook
Over 70% of Fortune 100 companies use IDAutomation's products to automate their businesses.