QR-Code in a Crystal Reports reportCrystal Reports QR-Code Barcode Generator (With Swiss QR, TLV and Base64)

  • Supports standard QR-Code in addition to GS1-QRCode, AIM-QRCode and Micro QR-Code.
  • Easily add QR-Code 2D symbols to Crystal Reports without installing fonts.
  • Created according to the ISO/IEC 18004:2015 standard accepted worldwide.
  • The QR-Code object stays embedded in the report, even when it is distributed.*
  • Implementation is easy; copy and paste the object into the report.
  • Supports Crystal 9 and up. (Products that support version 7 & 8)
  • Includes patented technology available only at IDAutomation.
  • Native source code is provided with purchase.
  • Version 2020 and greater adds support for the Swiss QR-Bill as Center Override.
  • Version 2021 and greater supports UTF-8 encoding; this includes compatibility with Kanji, Arabic & Japanese characters.
  • Version 2022 supports TLV (Tag-Length-Value) in Base64 QR Code for ZATCA Saudi KSA E-Invoicing.

User Manual Integration Support Download Demo Buy License

Developed by IDAutomation for Crystal Reports

QR Code is a matrix symbology similar to Data Matrix. The Native Crystal version encodes ASCII Characters, numbers, text and actual bytes of data, including Unicode UTF-8 characters and images according to the ISO/IEC specification. Three modes are supported including binary, digits and uppercase letters, and large numbers. The latest version supports QR Code Invoicing, Swiss QR Code, QR Bill, TLV and BASE64 encoding.

A single Crystal Reports RPT file provided in this package contains the formula object. Properties of the symbol generation may be easily changed in the first part of the file and shown in the code sample below. 

'Modify DataToEncode to connect to the data source;
'For example: 'DataToEncode = ({DataTable.DataField})

DataToEncode = "This QR-Code encoder is provided by IDAutomation.com"

' Optional parameters
ProcessTilde = 1            ' If = 1 the Tilde will be processed 
EncodingModes = 0           ' 0=Binary | 1=0nly numbers and uppercase letters | 2=Numbers only
ErrorCorrectionLevels = 0   ' 0=15% | 1=30% | 2=7% | 3-25% 
Version = 0                 ' 0=Automatic 
UTF8 = 1                    ' 1 enables UTF-8 Unicode encoding. If not needed, set the UTF8 variable to 0 to speed up processing
NewLineCharacter = Chr(13) & Chr(10)

To verify the proper encoding of GS1 Data, ASCII functions, and UTF8 Unicode, IDAutomation recommends the Barcode Decoder Verification App.

TLV Base64 QR Code Example

Version 2022 and greater of this product supports an easy method of encoding TLV (Tag-Length-Value) in Base64 for QR Code compatible with ZATCA, Saudi, Zakat & KSA E-Invoicing. It also contains a general Base64 encoding option that may be easily decoded with the IDAutomation Data Decoder App. This functionality is enabled when ProcessTilde = 1.

  • TLV in Base64 - When the first character is | the Crystal Formula automatically encodes TLV values separated by | in Base64, for example:
    DataToEncode = "|IDAutomation|123456789012345|2022-11-30 06:04:31|92435.77|2692.77"
  • TLV without Base64 - When the first two characters are ^| then automatically encode TLV values separated by | for example:
    DataToEncode = "^|IDAutomation|123456789012345|2022-11-30 06:04:31|92435.77|2692.77"
  • Base64 - When the first character is = encode the DataToEncode in Base64 excluding the =

Swiss QR Bill Center Override Example

Version 2020 and greater of this product supports an easy method of encoding the swiss cross into the center of the symbol with Center Override which is a form of image overlay. Do not use the ErrorCorrectionLevel of 2 when using the Swiss QR; instead, use ErrorCorrectionLevel of 0, and if the symbol is too small or does not scan change the ErrorCorrectionLevel to 3. The LF command is inserted with the &Chr(10)& code and static data must be in quotes. Below is an example that generates the Swiss QR as static data in a report.

Dim Swiss_QR_Data as String
Swiss_QR_Data = "SPC"&Chr(10)&"0200"&Chr(10)&"1"&Chr(10)&"CH7122334455667788991"&Chr(10)&"S"&Chr(10)&"IDAutomation.com Inc."&Chr(10)&"Tampa Bay"&Chr(10)&"45"&Chr(10)&"5050"&Chr(10)&"Florida"&Chr(10)&"CH"&Chr(10)&""&Chr(10)&""&Chr(10)&""&Chr(10)&""&Chr(10)&""&Chr(10)&""&Chr(10)&""&Chr(10)&"0.00"&Chr(10)&"CHF"&Chr(10)&"S"&Chr(10)&"IDAutomation.com"&Chr(10)&"Mühlfeldstraße"&Chr(10)&"4"&Chr(10)&"3441"&Chr(10)&"Einsiedl"&Chr(10)&"AT"&Chr(10)&"SCOR"&Chr(10)&"3100000007739471430109015"&Chr(10)&"This Swiss QR Code was generated by IDAutomation.com"&Chr(10)&"EPD"&Chr(10)
DataToEncode = Swiss_QR_Data & "~CO99,00007F00770077004100770077007F000000"
' Optional parameters
ProcessTilde = 1            ' If = 1 the Tilde will be processed 
EncodingModes = 0           ' 0=Binary | 1=0nly numbers and uppercase letters | 2=Numbers only
ErrorCorrectionLevels = 0   ' 0=15% | 1=30% | 2=7% | 3-25% 
Version = 0                 ' 0=Automatic 

The symbol generated from the code above:

The same symbol data with ErrorCorrectionLevel = 3 instead of 0:


About the Legacy Hybrid Version

A hybrid version of the QR Code Generator is included for high-speed barcode generation, which requires the installation of the IDAutomation Crystal UFL (version 2015 or later) to perform a portion of complex calculations required for quicker barcode generation. Installation of this UFL is automatic when running the installer for this product. It is highly recommended to use the native formula object instead of the UFL. The UFL does not support the latest capabilities including UTF-8, TLV, Base64, GS1-QRCode and Micro QR-Code.