IDAutomation.com, Inc., Computers Hardware, Software & Services, Tampa, FL Contact IDAutomationView your cart in the IDAutomation Store  
Loading
Home > Font Encoders > Font Encoder Formulas for Crystal Reports Tutorial

Barcode Font Encoder Formulas for Crystal Reports

  • Crystal Reports Barcode Font Formula TutorialEasily create barcodes in Crystal Reports using fonts without installing UFLs or DLLs.
  • Embeds the font encoder as a formula that is part of the .rpt report file.
  • The encoder stays embedded in the report when it is distributed.
  • Compatible with Crystal 8 and up.
  • Supports generation of Code 128, Code 39, Interleaved 2 of 5, UPC, EAN, Postnet, Planet, Data Matrix, PDF417 and other barcode types.
  • Source code included.
  • Royalty free.

Crystal Support Crystal UFL

Font Formula Tutorial

How to Create Barcodes in Crystal Reports using Formulas and Fonts

View Video Full Screen on YouTube

IDAutomation's Font Encoder Formulas for Crystal Reports are saved as part of the report file (.rpt) and do not have any external dependencies (with the exception of the required barcode font). When distributing Crystal Reports to other users, IDAutomation suggests using this method.

Formulas are currently supplied with the following font packages:

Each formula that is to be used with the font is supplied in the purchased barcode font package. The font formulas are included in the Crystal Reports Example Report and must be copied out of the example report into any new reports. Be sure to have the barcode font installed first so that the barcode will appear in the report after adding the formulas.

  1. This Crystal Report Barcode tutorial uses Code 128 from the Code 128 Font Advantage Package.
  2. Purchase and install the appropriate barcode fonts by running the INSTALL.EXE file, if the package contains one.
  3. Open the Crystal Reports Example from the icon in the program group or from the "Crystal Reports Formulas" folder of the product ZIP file.
    The "Crystal Reports Formulas" folder of the product ZIP file.
  4. Choose View - Design to switch to design mode.
  5. Select the desired formula field and choose Edit - Copy. If the formula being copied also contains a separate text field below the barcode, and the human readable interpretation is desired, both formulas should be copied to the destination report.
    This formula also contains a separate text field below the barcode.

    Note: The barcode may not appear in the formula field as shown above, if the font for the formula it is intended for is not installed.
  6. Open the destination report in design mode and choose Edit - Paste to paste the formula object where it is needed.
  7. Highlight the object and choose Edit - Edit Formula.
  8. Modify the "DataToEncode =" line of the formula to equal the data that is to be encoded in the barcode. If a separate text field was also copied, the same changes should also be made to that formula.
    Connect to datasource

    If an error such as "A string is required" appears, the data will need to be converted to a string with a crystal function such as cStr. For example: DataToEncode = cStr( {Table.Field},0 )
  9. Run the report to verify barcodes are being properly created. Ensure the formula field object has been sized properly to contain the entire barcode width. If the width of the barcode is larger than the object, the result will be a truncated barcode that will not scan.
  10. When the Preview tab (or File - Print Preview) is selected, barcodes should be seen in the report. Print one page of the report and test with a barcode scanner. If a scanner is needed, IDAutomation suggests the IDAutomation USB Barcode Scanner, which scans all popular linear, GS1 DataBar and PDF417 barcodes.
    Barcodes in The Report Preview
     
    When 2D Data Matrix, QR Code, Aztec or Postal and Intelligent Mail symbols need to be verified, IDAutomation suggests the 2D USB Barcode Scanner with PQA.
  11. It is also possible to combine multiple fields and place functions in a single barcode when using the Code 128 Auto formula in a report. For example, the following formula combines two fields in a single barcode and places a tab function between them:
    DataToEncode =({Table1.DataField1} & CHR(9) & {Table1.UPC})
    The following formula places a return function after the barcode:
    DataToEncode = ({Table1.DataField1} & CHR(13))
    Use CHR(9) for tab and CHR(13) for a return.

Creating Report Custom Functions

For advanced barcode Crystal Report developers using version 9 or above, Report Custom Functions may be created from IDAutomation's formulas and placed into the Repository of Custom Functions. Follow the procedures provided in the Crystal Reports documentation to create the function in the formula workshop and paste the formula (obtained from IDAutomation Formulas for Crystal Reports) in the function. For example:

Function IDAutomationCode128 (DataToEncode 
as String) as String
  <<<include source code here that creates the PrintableString from DataToEncode>>
  IDAutomationCode128 = PrintableString
End Function

Then in the Crystal Report, simply call the function:

IDAutomationCode128 ( {Table1.DataField1} )

NOTE: At this time, IDAutomation's support department does not troubleshoot Report Custom Functions. Please consider attempting to reproduce the issue with the IDAutomation Formulas for Barcode Crystal Reports Tutorial to obtain support for a particular problem with the formulas. If there is a problem working with IDAutomation's barcode fonts, visit the Barcode Font Support page. For assistance with other Crystal reports issues, refer to Crystal Reports Support Site.

Technical Support

Forum Support for Font Formulas for Crystal ReportsFree product support may be obtained by reviewing articles that are documented on the IDAutomation's Barcode Font Support page and by searching resolved Public Forum Threads. Priority phone, email and forum support is also provided up to 30 days after purchase. Additional priority phone, email and forum support may be obtained if the Priority Support and Upgrade Subscription is active. For assistance with other Crystal reports issues, refer to Crystal Reports Support Site.

 © Copyright 2014 IDAutomation.com, Inc., All Rights Reserved. Legal Notices.

 Barcode Fonts | Components | Scanners | Support | Contact Us
Training Videos on YouTube Join us on Google Plus 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.