1. Right click command prompt and run command prompt as administrator.
Type in the following commands to register cruflbcs.dll
cd "C:\Program Files (x86)\Common Files\Barcodesoft\FontUtil"
regsvr32.exe cruflbcs.dll
To register 64-bit DLL, please type in the following commands
cd "C:\Program Files (x86)\Common Files\Barcodesoft\FontUtil"
%systemroot%\System32\regsvr32.exe cruflbcs_x64.dll
If you see the following Window pop up, your registration was successful.
2. Open your crystal report. Right click Formula Fields, choose "New..." from the context menu.
Type in "qrcode1" in the Name textbox, then click "Use Editor".
3. After QRCode encoding process, even a short string might return more code words than you expect.
However, Crystal Reports allows no more than 254 characters in a formula field.
Therefore we have to split QRCode code words into different parts, and concatenate them in a Text Object before apply font BcsQRCode.
As for how many formula fields are needed, you use the following function to find out:
BCSQRCodeFormulaNoForCR({Data.Code}).
4. Create multiple formula fields as listed below if returned code words are more than 255. Then drag and drop them in sequence within the same Text Object.
Local stringVar codestr := "QRCode" + Chrw(13) + chrw(10) + {Test.Data};
BCSQRCodeEncodeCR({Test.Data}, 1, 1, 0, 0)
Local stringVar codestr := "QRCode" + Chrw(13) + chrw(10) + {Test.Data};
BCSQRCodeEncodeCR({Test.Data}, 2, 1, 0, 0)
Local stringVar codestr := "QRCode" + Chrw(13) + chrw(10) + {Test.Data};
BCSQRCodeEncodeCR({Test.Data}, 3, 1, 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 in the formula field is error correction level. Its value ranges between 1 and 4 that represents L07, M15, Q25 and H30 separately. When set to default value 0, it stands for M15 error correction level.
For Girocode or European Payments Council (EPC) QR Code users, please define the following formulas
str = "BCD" & "�a;" & "001" & "�a;" & "1" & "�a;" & "SCT" & "�a;" & "BFSW3E33BER" & "�a;" & "Collection folder" & "�a;" & "DE33100206000001194701 " & "�a;" & "EUR123.45"
BCSQRCodeEncodeCR(str, 1, 1, 0, 0, 0)
BCSQRCodeEncodeCR(str, 2, 1, 0, 0, 0)
BCSQRCodeEncodeCR(str, 3, 1, 0, 0, 0)
After each data section, please add & "�a;". It will interpreted as ASCII 0A character.
For detailed explanations of each parameter, please refer to user's manual.
You will see some hex codes in your report. Don't worry! You have NOT applied QRCode font typeface yet.
5. Right click Text Object and choose "Format Object" from context menu. Then choose "BcsQRcode" as font typeface for the Text Object.
6. Click OK button. You will see QRCode in your report.