[Unit][ReportWorkshop] Display fields as QRCode

Demos, code samples. Only questions related to the existing topics are allowed here.
Post Reply
Sergey Tkachenko
Site Admin
Posts: 17602
Joined: Sat Aug 27, 2005 10:28 am
Contact:

[Unit][ReportWorkshop] Display fields as QRCode

Post by Sergey Tkachenko »

This example shows how to display values of fields in ReportWorkshop as QRCodes.

This is the first version of barcode field object for ReportWorkshop. It supports only QRCodes, and generates results as TMetafile (so it is VCL-only)

How to use
  1. Download Zint Barcode Generator for Delphi, free open source barcode generator for Delphi and Lazarus. Add path to its PAS-files to Delphi library.
  2. Include RVReportZintBarcode.pas in your project.
  3. Add RVReportZintBarcode.pas to "uses" of the main form unit.
Syntax

This unit implements "qrcode" field type to display text values as QRCodes.
The simplest syntax:

Code: Select all

{FIELDNAME qrcode}
This field type has an optional format string, in a form of space-delimited list property=value, with supported properties:
  • size - image size in pixels (default - 100)
  • color - foreground color (default - black)
  • backcolor - background color (default - white)
Example:

Code: Select all

{VALUE qrcode "color=darkred size=200"}
Example

Report design

RW-QRCode-Design.png
RW-QRCode-Design.png (28.75 KiB) Viewed 33422 times

Report result:

RW-QRCode-Result.png
RW-QRCode-Result.png (26.08 KiB) Viewed 33422 times

Plans

I plan to extend this unit:
  • to allow generation of all types of barcodes supported by Zint
  • to support more output image formats
  • Lazarus compatibility
  • more parameters in format string
Sergey Tkachenko
Site Admin
Posts: 17602
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: [Unit][ReportWorkshop] Display fields as QRCode

Post by Sergey Tkachenko »

Update: a download link is removed, because an advanced version of this add-on is included in ReportWorkshop setup, in <TRichView Dir>\ThirdParty\Barcode\Zint\Source\ folder.
It implements all the features listed in the "plans" above.
Post Reply