Nowadays “QR-codes” are gaining their popularity. Unlike conventional barcodes, “QR-codes” allow you to encode more information in different formats. They are widely spread in trade, logistics and production. To recognize such codes one does not need a special laser reader. A smartphone camera will be enough. Easy recognition is the secret of popularity of “QR-codes”.
As a modern reporting tool, FastReport.Net provides an opportunity to use “QR-codes”.
Let us view the possibility in detail.
Run the report designer. You will find a QR-code component in a pop-up menu of the control Barcode
Select the item “QR Code” from the list and add the control to the page:
Open the barcode editor by double-clicking on the component. This can also be done from the context menu. Select "Edit":
Now, let us view the Barcode editor:
It is very similar to the expression editor. There will be a “data tree” on the right. You can "drag and drop" elements from it into a text editor. After there will a drop-down list appear above. You can choose the type of content QR code there:
Let us consider more types with examples of codes and data:
- “Text” is the text in alphabetical and numerical representation. We use the text "12345678":
- “vCard” ( also known as Versitcard) is a format for electronic business cards. In this format you can send information about a person:
- Full name;
- Name of the organization;
- The logo of the organization;
- Phone numbers;
- Video and audio fragments and etc.
- “URI” is Uniform Resource Identifier is a line identification of files, documents, images,
e-mails, web service, etc .:
- “EmailMessage” is an e-mail text:
I have a question about FastReport.Net.;;
- “Geolocation” is coordinates to determine the actual geographic location:
- “SMS” is a short Message:
SMSTO:(71) 555-4444:Hello, Dolly! I'm fine!
- “Call” is a phone number:
- “Event” is an event marked in the calendar. It contains date / time and a text message:
SUMMARY:Back to the Future Day!
- “Wi-fi” is information to connect to the wi-fi network:
Click the button "Save" to accept the changes.
Now, let us review some properties of Barcode object:
Notice the Encoding property. Here you can select the text encoding, for example: UTF8, Windows_1251, CP_866 and others.
To provide redundancy use Error Correction. It can be: L (low), M (medium), Q, H (high). These levels provide a variety code redundancy. Redundancy is necessary for correct reading of data when the image of the code is partly damaged.
Here is the percentage equivalent of error correction levels:
- L – 7%;
- M – 15%;
- Q – 25%;
- H –30%.
QuietZone property determines by the availability of a white QR-code frame.
To hide the text under the code, change the value of the ShowText = false.
AutoSize property is responsible for automatic adjustment of the size of the code, depending on the size of the object.
Summing up, we have reviewed the use of “QR-codes” in FastReport.Net. This feature expands the use of the reporting tool in modern workflows.