Barcode User Function Library for Crystal Reports

How to Install

The installation guide and setup files are available here.

UFL DLL - Properties and Methods

BarcodeSetLongProp

Sets the value of a numeric property of the barcode generator.

Syntax

Parameters:

Return value

Examples

Choosing a barcode type:

BarcodeSetLongProp ("Alphabet", 5) ' 5 = CODE128

Encoding data in UTF-8:

BarcodeSetLongProp ("CodePage", 65001)

Remarks

The following properties can be modified through the BarcodeSetLongProp (UFL DLL shares the property names with the ActiveX):

BarcodeSetTextProp

Sets the value of a text property.

Syntax

Parameters:

Return value

Examples

Encoding a text string in the barcode:

BarcodeSetTextProp("Text", "ABCDE3457")

Modifying the text below the barcode:

BarcodeSetTextProp ("TextBelow", "Some text")

Remarks

The list of properties that can be modified through the BarcodeSetTextProp (UFL DLL shares the property names with the ActiveX):

BarcodePicture

The function creates a WMF picture file in the system temporary folder.

Syntax

Parameters:

Return value

Example

BarcodeSetLongProp ("Alphabet", 25) ' 25 = QR Code BarcodeSetTextProp ("Text", "123ABC") formula = BarcodePicture(1440, 1440) ' an 1x1 inch barcode picture

BarcodePicture2

The function creates a monochrome BMP picture file in the system temporary folder.

Use this function instead of the BarcodePicture in late versions of Crystal Reports - they have a EMF/WMF printing bug(?).

Syntax

Parameters:

Return value

Examples

BarcodeSetLongProp ("Alphabet", 25) ' 25 = QR Code BarcodeSetTextProp ("Text", "123ABC") formula = BarcodePicture2(5, 1) ' A QR Code with 5x5 pixel modules. BarcodeSetLongProp ("Alphabet", 5) ' 5 = CODE 128 formula = BarcodePicture2(2, 3) ' A CODE 128 with 2 pixel wide modules and with width:height ratio of 3:1. BarcodeSetLongProp ("Alphabet", 6) ' 6 = PDF417 formula = BarcodePicture2(1, 0.5) ' A tall PDF417 with 1 pixel wide modules.

BarcodeGetErrorCode

Retrieves the last error code.

Syntax

Return value

Examples

Paste this expression into a formula field:

formula = BarcodeGetErrorCode ()
Facebook X Bluesky Youtube Contacts

© 2025 StrokeScribe. All rights reserved. Use of any portion of this site constitutes acceptance of our Terms of Use and Privacy Policy. The website material may not be reproduced, except with the prior written permission.