• data matrix barcode download
  • data matrix barcode order

Print Data Matrix Barcode in Crystal Reports

Data Matrix is a kind of 2D barcode that is able to encode more than 1000 alphanumeric characters.

To print Data Matrix barcode in Crystal Reports, you need Barcodesoft UFL (User Function Library) and BCSDatamatrix barcode font.

1. Install Data Matrix demo on your computer.

2. Open DOS prompt. If you are using Windows 10 or Windows 7, please Open DOS prompt as administrator.
Please go to the following folder
CD C:\Program Files\Common Files\Barcodesoft\FontUtil
Type in the following DOS command to register crUFLbcs.dll
regsvr32 crUFLbcs.dll
data matrix crystal reports DLL DOS registration

3. Open your crystal report. Right click Formula Fields, choose "New..." from the context menu. Type in "BcsDataMatrix1" in the Name textbox, then click "Use Editor".

data matrix create formula crystal reports

After Data Matrix encoding process, even a short string might have much more code words than you expect.
While Crystal Reports allows no more than 255 characters in a formula field.
Therefore we have to split Data Matrix code words into separate parts, and concatenate them in a Text Object before apply font BcsDataMatrix to the Text Object.
As for how many formula fields are needed, you can find out by using the following function BCSDatamatrixFormulaNoForCR.

4. Create more formula fields as listed below if returned code words are more than 255. Then put them in sequence within the same Text Object.

BCSDataMatrixEncodeCR({Test.Data}, 1, 0, 0, 0)
BCSDataMatrixEncodeCR({Test.Data}, 2, 0, 0, 0)
BCSDataMatrixEncodeCR({Test.Data}, 3, 0, 0, 0)

The first parameter in the formula field is string to encode.
The second parameter in the formula field is index.

The third parameter of the formula is Format. Its values range between 0 and 30. When set to zero, it means auto-selected format.

The fourth parameter is Encodation method. Its values range between 1 and 6 which stand for the following encodation separately: ASCII, C40, TEXT, X12, EDIFACT, BASE256.

The fifth parameter is GS1 indicator. It is a Boolean indicating whether this is a GS1-compliant barcode. Set it to zero when this is not GS1-datamatrix compliant.

For detailed explanation of parameters, please refer to Data Matrix UserManual.
data matrix crystal reports UFL

5. Right click Text Object and choose "Format Object" from context menu. Then choose "BcsDatamatrix" as font typeface for the Text Object.

  • data matrix crystal reports download
  • data matrix software order