Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

QR Barcodes

edited June 2014 in General
Hi

I have been experimenting with the QR Barcodes in Report Builder, a few
questions if I may.

0. Not really a RB problem but do you have access to a list of functions
which can be called by QR Codes? I have successfully run a web page from a
QR Code and also created a text message. I am sure there must be a lot more
functions available but cannot seem to find a concise document on the
subject.

1. In RB can we remove the caption text to the QR Code, in our
application, sometimes this is useful, others not.

2. In RB can we control the size of the QR Code, no matter how small I
shrink the component on the form it seems to spring back to its previous
size.

3. I was looking at the Han-soft QR Codes mentioned in the RBWiki. In
their help file on how to use with Report Builder..

http://www.han-soft.com/releases/barcode2d/documents/f_howtouserb.html

they describe the procedure as below. However the TppReport
component knows nothing about 'ppReport1Image1.Picture.Bitmap...' or
'ppReport1Image1.Picture'

Do you have a sample report which uses their components?

Best Wishes

Philip L Jackson

extract from Han-soft manual....
Create the OnBeforePrint event function for the TppReport component.

In the event function, change the properties of the TBarcode2D component
such as Barcode, Module, and Orientation, and adjust the bitmap size of the
TppImage control in order to accommodate entire barcode symbol, then use the
DrawTo method of the TBarcode2D component to draw the barcode symbol to the
TppImage control.

For example:

var

AWidth, AHeight, ASymbolWidth, ASymbolHeight: Integer;

begin

Barcode2D_QRCode1.Barcode := '1235678';

Barcode2D_QRCode1.Module := 1;

......

Barcode2D_QRCode1.DrawToSize(AWidth, AHeight, ASymbolWidth, ASymbolHeight);

ppReport1Image1.Picture.Bitmap.Width := AWidth;

ppReport1Image1.Picture.Bitmap.Height := AHeight;

Barcode2D_QRCode1.DrawTo(ppReport1Image1.Picture.Bitmap.Canvas, 0, 0);

end;

Comments

  • edited June 2014
    1. Used PrintHumanReadable property for remove caption text;
    2. Impossible at the moment. I ask digital-metaphors add
    RelativeModuleSize property.
    And they promise consider adding a feature like this to the new barcodes
    for a later release of ReportBuilder.
    3. You have to put a TppImage control to your report in order to present
    the barcode symbol.
    ppReport1Image1 is the name of this TppImage.

    But I think that RB control for QRBarcodes is native and more simple in
    use.


    On Fri, 20 Jun 2014 02:20:11 +0300, Philip L Jackson
  • edited June 2014
    Hi

    Thanks for the information

    Philip L Jackson

  • edited June 2014
    Hi Philip,

    0. The Wikipedia page on QR Code is a good place to start. It's "Uses"
    section is fairly extensive. A Google search for QR Code Uses also
    gives an abundance of information.

    http://en.wikipedia.org/wiki/QR_code

    1. As Dima explained, you can use the PrintHumanReadable property to
    control the text accompanied with the barcode.

    2. It is definitely possible to control the size of a QR Code in
    ReportBuilder. The size of the QR Code is controlled by the ModuleSize
    property. Each Module (or square) inside a QR Code is the same size.
    You can currently adjust the ModuleSize property to get a QR Code as
    closely to the correct size you need.

    As Dima mentioned, a RelativeModuleSize property would make this process
    easier by automatically adjusting the ModuleSize according to the
    control size. This is a feature that we will consider for a later release.

    3. We do not have an example of using HanSoft components, however it
    appears "ppReport1Image1" is simply the name of a TppImage component
    placed on a report. You would replace this with your own image name.

    In the article below has an example of displaying a QRCode using a free
    third party library in a similar manner. There should be no need for
    this any more because QR Code is now natively supported.

    http://www.digital-metaphors.com/rbWiki/RCL/BarCode/QR_Code

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.