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

Tpp2DBarcode

edited November 2013 in General
Hello,


RbRPo 15.01 build 2, Delphi XE4

We have some issues with the Tpp2DBarcode component. Some combinations of
properties can lead to errors and can crash Delphi if you are working in the
Report Designer at Delphi designtime. We always build our test/debug
versions with all checks enabled, that revealed errors with just changing
some properties.

The following are tested at runtime with our test/debug version of the
ReportDesigner:

1. place a Tpp2DBarCode on the the layout and set BarCodeType = DataMatrix.
That gives a RangeCheck error on line 1501 of unit ppBarCode2DDataMatrix

2. - Set BarCodeType = QrCode and CodeVersion = 0
- Make the Data somewhat longer, ie 30 chars
- Now set the CodeVersion tot 1 -> rangecheck error or Access violation
in different places
- This one can crash or hang Delphi if you do it at Delphi designtime
with the installed designtime packages.

3. This one is harder to reproduce. To be able to set BarcodeType to
DataMatrix you must build with RangeChecks of.
Then Set BarCodeType = DataMatrix and EncodeType = etdmAuto.
You get a RangeCheck error or 'Cannot find suitable size, encode error'.
I think this is caused by the fact that in proc
TppDraw2DBarCode.PropertiesToBarCodeEncoder
aBarCodeEncoder.EncodeType is set before aBarCodeEncoder.Data is filled.
That makes proc TppDataMatrix.Iec16022Ecc200 go wrong. I see liMatrix_IDX,
the index in array cEcc200Matrix go out of bound and then the random values
of the out of bound entries are used what leads to unpredictable results.

At Delphi designtime you may get an exception "Barcode Creation error:
Cannot find suitable size.." but also access violations.


4. BarCodeType = pdf417 and (very) long Data (> 1K) gives an 'invalid
codeword' exception.


For now we build the RbPro units with {$R-} and a modified
TppDraw2DBarCode.PropertiesToBarCodeEncoder but just suppressing the errors
seems not the right solution.


Regards,

Max Paay
Quadrant Software bv.
The Netherlands.

Comments

  • edited November 2013
    Hi Max,

    1 - 3: There are now patches available for RB 15.01 Build 2 that solve
    these issues. Send an email to support@digital-metaphors.com requesting
    the patches and we will email them to you as soon as possible.

    4. An "invalid codeword" error implies that you have an invalid
    character or characters somewhere in your data string. PDF417 barcodes
    support single byte character sets only (ASCII 0-255).

    Best Regards,

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