NextGen Knowledge Center

Add Barcodes to a Report

You can add barcodes to an SAP Crystal Reports by incorporating database fields into formulas. When you create the report, you should take into consideration about the field size, specifically height and width. If you create a barcode that is too wide or too small, it may cut off characters or not scan at all. For example, the maximum number of characters for a readable barcode on a lab specimen label is 19.
  1. Open the copy of the NextGen® Report you want to modify.
  2. If needed, select Design and Field Explorer from the View menu.
    Crystal reports

  3. In Field Explorer, right-click Formula Fields and select New.
    The Formula Name window opens.
    Formula Name

  4. Enter a name that identifies the formula. For example, “barcode_ufo_num” and select OK.
    The Formula Workshop - Formula Editor window opens.

  5. In the Functions pane, expand Additional Functions, then locate and expand the barcode UFL DLL. For example, azalea (U25azalea.dll).
  6. From the expanded list, double-click a barcode type. For example, BarcodeC39ASCII (Alphanumeric.BarcodeC39ASCII()) displays in the Formula Text pane.
  7. In the Report Fields pane, expand the database connection and appropriate table, then double-click the appropriate field. For example, the ufo_num field in the lab-nor table, BarcodeC39ASCI ({lab_nor.ufo_num}) now displays in the Formula Text pane.
  8. Select Save and Close to store the formula and return to Field Explorer.
  9. Drag and drop the barcode_ufo_num field onto the report.
  10. Right-click the barcode_ufo_num field and select Format Field.
    The Format Editor window opens.
    Format Editor

  11. Select the Font tab, choose a barcode font from the Font list (for example, Code39NarrowI) and select OK.
    Font

  12. Select the Preview tab to view how the report appears when printed.
    Preview

  13. Add additional barcode fields as needed and then save your report.
  14. Print out your report and scan the barcodes for verification and accuracy.
Add Barcodes to a Report