Search Results for

    Show / Hide Table of Contents

    QR code

    QR code is a two-dimensional barcode used to store numeric, alphanumeric, and binary information.

    For accurate QR code recognition using a camera, special markers are employed at the corners and within the image area. This allows for image normalization post-scanning and conversion of dot encoding into binary numbers with checksum verification.

    A QR code can contain up to 4296 characters using alphanumeric encoding.

    Object

    To generate a QR code in FastReport .NET, select the Barcode object BarcodeIcon at the Components Panel in the Report Designer. In the drop-down list, navigate to the "Two-dimensional" category, and then choose QR Code:

    BarcodesList

    After selecting the barcode, place it on the Report Page.

    Double-click on the added barcode to open the editor. You can also open the barcode editor by clicking the button EditButtonIcon in the context menu of the added object, accessed by right-clicking.

    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 lies in the presence of tabs on the left side of the window. These tabs determine the type of content for the QR code.

    Depending on the selected content type, a corresponding set of fields for input 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. https://www.fast-report.com/products/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:Team Meeting
    DTSTART:20240420T090000Z
    DTEND:20240420T100000Z
    DESCRIPTION:Weekly team meeting to discuss project updates.
    END:VEVENT
    Wi-Fi Information for connecting to a Wi-Fi network. WIFI:T:WPA;S:Honeypot;P:youarewelcome;H:true;
    Swiss QR 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
    Carl Ltd.
    Luber
    16
    123321
    Berlin
    GE







    50050.00
    EUR
    S
    Sigmunt Shuld
    Lunglen
    23
    123322
    Ferburg
    GE
    NON


    EPD

    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
    Angle Rotation angle (in degrees) for decorative QR code modules. More information about decorative modules is provided in the section below.
    Color Barcode color. Default: Black.
    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%). Default: L.
    QuietZone The presence of a white border around the QR code. Default: True (enabled).
    Shape Choosing the shape of the QR code modules (dots). Default: Rectangle.
    UseThinModules Visual modification of the QR code (reducing the size of the data modules, adding small spaces between them). Default: False.

    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:

    If you want to hide the text under the barcode, locate the ShowText property in the property inspector of the corresponding barcode and set its value to False.

    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 to False). In this case, you need to monitor the proportions yourself.

    Decorative QR Code Modules

    By default, QR codes consist of square modules (dots). The Shape property allows you to replace them with decorative figures to improve the design.

    The Angle property sets the rotation angle (in degrees) for each QR code module. It works only for the following shapes: Hexagon, Star and Snowflake. For other shapes, this property is ignored.

    The UseThinModules property controls the visual density of modules (dots) in the QR code. Finder Patterns (the large squares in the corners of the QR code that help the scanner determine the position, size, and orientation of the code) are NOT changed when using this property. They always remain full-sized to ensure reliable code recognition by the scanner.

    The table below lists all available values for the Shape property.

    Shape value Description
    Rectangle Standard QR code appearance.
    Circle Modules in the shape of circles.
    Diamond Squares rotated by 45 degrees.
    RoundedSquare Squares with rounded corners.
    PillHorizontal Horizontally elongated modules with rounded edges.
    PillVertical Vertically elongated modules with rounded edges.
    Plus Modules in the shape of a cross (+).
    Hexagon Modules in the shape of a hexagon. Supports rotation.
    Star Modules in the shape of a star. Supports rotation.
    Snowflake Six-pointed snowflake-shaped modules. Supports rotation.

    Visual examples of all possible module shape variations:

    Decorative modules may reduce scanning reliability, so it is necessary to test the finished QR code on different devices and scanners. For stable operation, it is important to maintain high contrast between modules and the background, and avoid using complex shapes for small QR codes. It is recommended to set a high error correction level. The more complex the shape, the stricter the requirements for size and print quality. More detailed recommendations for ensuring reliable scanning of decorative QR codes are provided in the article.

    Examples of QR codes with all supported decorative shapes are available on the second page of the demo report Qr-Codes.frx.

    Back to top © 1998-2026 Copyright Fast Reports Inc.