Precision, Performance, Confidence. ™

Adding a QR code to Crystal Reports

The METTEAM installation includes a QR code font named bcsaztec.ttf. If Crystal Reports Designer is installed on a different computer, you will need to install the font onto the machine that Crystal Reports Designer is installed on to be able to make use of it in reports.

Installing the font

  1. Verify whether the font is installed on the METTEAM server in c:\Windows\Fonts\bcsaztec.ttf.
  2. Load the METTEAM installation ISO file on the PC with Crystal Reports.
  3. On the installation ISO, navigate to \Setup\Fonts.
  4. Double-click on bcsaztec.ttf.
  5. You will be prompted to install it. Click the Install button.
  6. Open Crystal Reports and BcsAztec should now be an option as a font.

Using the font in Crystal Reports Designer

  1. You will need to create a formula field to encode the information to the BcsAztec font.
  2. Right-click on Formula Fields and select New...
  3. You will be prompted to give it a name. Go ahead and name it to something that describes its function (e.g. QR_Barcode).
  4. In the Formula Workshop, you will need to enter BCSAztecEncode () around the field you would like for the QR code. Here is an example of the formula for the work order barcode:
  5. Hit Save and Close once you have gotten your formula entered.
  6. Note: You may get an error saying that there is an error in your formula. This does not effect the QR code from displaying when the report is run in METTEAM. If you would like to make it so that error does not pop up when adding QR codes, go to the next section which details resolving the issue.
  7. Click and drag that newly entered formula into your report.
  8. Click the font dropdown and select BcsAztec.
  9. Resize the field to be able to show the whole QR code. You may need to tweak this several times to get it to display properly.

Fixing the formula error in Crystal Reports Designer

The DLL file included and registered during METTEAM installation (cruflBcs_x64.dll) is for the 64-bit Crystal Reports Runtime and allows the BCSAztecEncode() formula in a report to be properly called on your METTEAM server. Crystal Reports Designer, however, is a 32-bit application which will not recognize the included DLL. To fix the error that you get about your formula not being correct for the QR code formula, please take the following steps:

  1. Download the attached cruflBcs.dll file to c:\Windows\SysWoW64
  2. Download the attached cruflBcs_x64.dll to c:\Windows\System32
  3. Open up Command Prompt as administrator.
    • In Windows Server 2012-2016 and Windows 8-10, right-click on the Start Button and select Command Prompt (Admin).
  4. In Command Prompt type c:\Windows\SysWoW64\regsvr32.exe c:\Windows\SysWoW64\cruflBcs.dll. 
  5. You will get a pop-up saying DllRegisterServer in c:\Windows\SysWoW64\cruflBcs.dll succeeded.
  6. In the same Command Prompt window type c:\Windows\System32\regsvr32.exe c:\Windows\SysWoW64\cruflBcs.dll
  7. To make sure the 64-bit DLL is properly registered, type c:\Windows\System32\regsvr32.exe c:\Windows\System32\cruflBcs_x64.dll
  8. Click the OK button and you should no longer receive the error message for having BCSAztecEncode() in a Crystal Reports formula.

 

 NOTE:  if your Windows directory is not "C:\Windows" then you can use the below commands

%systemroot%\System32\ regsvr32.exe   %systemroot%\SysWoW64\cruflBcs.dll

 %systemroot%\SysWoW64\ regsvr32.exe   %systemroot%\SysWoW64\cruflBcs.dll

%systemroot%\System32\regsvr32.exe %systemroot%\System32\cruflBcs_x64.dll

 

 

 

Have more questions? Submit a request

Comments

Please sign in to leave a comment.