QR codes
QR code is a two-dimensional barcode used to store numeric, alphanumeric, and binary information.
For correct recognition of a QR code using a camera, it uses special markers at the corners and the area of the image.
This allows you to normalize the image after reading and convert the dot coding to binary numbers with checksum verification.
A QR code can contain up to 4296 characters (alphanumeric encoding is used).
Object
To add a QR code to the report page, click on Barcode in the tool palette.
Then you need to select QR Code in the list and click on the report page.
Double click on the barcode image to open a special editor. This can also be done from the context menu by choosing the Edit
item.
Editor
The QR code editor looks like a regular expression editor. There is a tree of data, parameters and functions on the right. From there, you can drag items into the text editor.
The main difference from the expression editor is the drop-down menu that defines the content type of the QR code.
Depending on the selected content type, a special set of fields appears.
QR code content types
When working with the editor, the content text (the fourth column of the table) is generated automatically. Editor fields can contain any expressions, including fields from the data source (you can drag them from the tree on the right).
Content type | Description | Image example | Content example |
---|---|---|---|
Text | Literal and numeric text | 12345678 |
|
vCard | Versitcard is an electronic business card presentation format. May contain the following information: Surname; Name; Position; Company; Company website; personal E-mail; work E-mail; Mobile phone; Home phone; Work phone; Address; Index; City; Country. Only some of the fields can be filled in. | BEGIN:VCARD VERSION:2.1 FN:AnneDodsworth N:Dodsworth;Anne TITLE:Manager TEL;WORK;VOICE(71) 555-4444 ADR:;;7 HoundstoothRd.;;;; END:VCARD |
|
URI | Uniform resource identifier. A string with a link to a file, document, image, email, website, etc. | http://www.fast-report.com/en/product/fast-report-net/ |
|
E-mail Address | E-mail address | support@fast-report.com |
|
E-mail Message | E-mail message | MATMSG:TO:support@fast-report.com;SUB:FastReport.Net question;BODY:Hello, I have a question about FastReport.Net.;; |
|
Geolocation | Coordinates for determining the geographic location | geo:-50.737563,-79.490016,120 |
|
SMS | Text message | SMSTO:(71) 555-4444:Hello, Dolly! I'm fine! |
|
Call | Phone number | tel:(71) 555-4444 |
|
Event | Event to add to the calendar. It can contain a text message additionally to the time and date. | BEGIN:VEVENT SUMMARY:Future Day! DTSTART:20221021T121141Z DTEND:20221021T121141Z END:VEVENT |
|
Wi-Fi | Information for connecting to a Wi-Fi network. | WIFI:T:WPA;S:Honeypot;P:youarewelcome;H:true; |
|
Swiss | A special QR code containing payment information for Swiss Bill. You can read more about this barcode in another article. | SPC 0200 1 CH4431999123000889012 S FastReports North Pitt Str 901 123456 Alexandria US |
Barcode properties
Now let's look at the properties of the QR code. They are available in the object inspector under the Barcode property.
Property | Description |
---|---|
Encoding |
Text encoding of the barcode content, for example: UTF8, Windows_1251, CP_866, etc. Default: UTF8. |
ErrorCorrection |
Error correction using the Reed-Solomon code. It can take on the following values: L (low - 7%), M (medium - 15%), Q (25%), H (high - 30%). The default is L. |
QuietZone |
Determines the presence of a white border around the QR code. Default: True (enabled). |
Color |
Determines the color of the barcode. The default is Black. |
The error correction is needed for correct data reading in case of a partially damaged code image or an image applied over it.
For example, if the redundancy is set to H (30%), the barcode shown below is read without problems:
To hide the text under the code, change the value of the
ShowText
property toFalse
.The
AutoSize
property is used for automatically adjusting the size of the code depending on the size of the object. If you need to manually resize the barcode (using the mouse), then you need to disable this property (set toFalse
). In this case, you need to monitor the proportions yourself.