Generate code39 Barcodes

Implement seamlessly across Crystal Reports, MS Excel, and MS Access

Generate Code 39 Barcode in Crystal Reports

How to generate a Code 39 barcode in Crystal Reports?

To generate a Code 39 barcode in Crystal Reports, create a new formula field using the BCSLinearCode39 function from the Barcodesoft UFL library. Pass your database fields as arguments, place the formula field on your design canvas, and apply the Code39MHr font family.

  1. Step 1: Determine SAP Crystal Reports Bitness and Register DLL

    Determine the bitness of your SAP Crystal Reports version. SAP Crystal Reports 2008 through 2016 are 32-bit, while SAP Crystal Reports 2020 and 2025 are 64-bit.

    For 64-bit Crystal Reports (2020 / 2025):

    Run Command Prompt as Administrator and execute:

    cd "C:\Program Files\Common Files\Barcodesoft\FontUtil"
    %systemroot%\System32\regsvr32.exe cruflbcs_x64.dll
    Registering 64-bit cruflbcs_x64.dll via Administrator Command Prompt

    For 32-bit Crystal Reports (2008–2016):

    Run Command Prompt as Administrator and execute:

    cd "C:\Program Files\Common Files\Barcodesoft\FontUtil"
    regsvr32.exe cruflbcs.dll
    Registering 32-bit cruflbcs.dll via Administrator Command Prompt
  2. Step 2: Create a New Formula Field

    Open your Crystal Report layout. Right-click Formula Fields in the Field Explorer pane and select New... from the context menu. Type "code39" in the Name textbox, then click the Use Editor button.

    Creating a new Crystal Reports formula field named code39
  3. Step 3: Locate the Barcodesoft Code 39 Function

    In the Formula Workshop, navigate to the Additional Functions directory and double-click the BCSLinearCode39 function listing located under the Visual Basic UFLs node.

    Selecting BCSLinearCode39 from the Visual Basic UFLs list inside the Formula Workshop
  4. Step 4: Use database field as parameter for code39 formula

    Provide your target database field as the primary string parameter inside the formula brackets. Click the Save button to validate and preserve your new code39 formula logic configuration.

    code39 crystal reports ufl
  5. Step 5: Insert code39 Formula Field Into Your Report Canvas

    Drag your newly saved code39 formula field out of the Field Explorer and drop it onto the design view grid canvas area where you want code39 barcode to appear. You will see some strange characters. Don't worry! You have NOT applied code39 barcode font yet.

    code39 barcode crystal reports UFL
  6. Step 6: Apply the Code39MHr Font Typeface

    Right-click the placed formula text block object on your canvas and choose Format Field from the context menu. In the Font customization tab pane, select "code39mHr" from the font family drop-down menu selection list.

    code39 font crystal reports

    The package includes 14 TrueType fonts in a variety of sizes and styles: With human-readable text: Code39XXL, Code39XL, Code39L, Code39M, Code39S, Code39XS, and Code39XXS; Without human-readable text: Code39XXL, Code39XL, Code39L, Code39M, Code39S, Code39XS, and Code39XXS. Each font is designed with a different aspect ratio, allowing you to select the one that best suits your application requirements.

  7. Step 7: Verify Code 39 Barcode Generation

    Click the OK button to apply changes. The text string placeholders will immediately transform and render as an active, readable Code 39 barcode inside your report template preview layout.

    code39 barcode crystal reports