TppDBBarCode produces AV when drawing
In RB 10.02 I have multiple subreports with Interleaved2of5 barcodes on
them with CalcCheckDigit = False. When the report attempts to render
itself to a RAF stream, I get an AV at line 1780 of the ppBarCodDrwCmd unit.
The data I return for the Barcode in the GetFieldValue event is
'5634254096737579', but the FData value just prior to the AV is
'5.63425409673758E15'. Clearly there is a conversion issue here, and
the code does not handle it's input validation very well.
It seems that the data value I return is formatted using
ppDisplayFormat, which for some reason treats the number as a Float
event though the ppField datatype is dtLargeInt. The precision of the
value I pass exceeds the precision of 15 specified at line 183 of
ppDisplayFormat, so I end up with exponential notation, which the
barcode component chokes on. I changed the precision to 16, the barcode
input is preserved, and the barcodes are generated correctly.
Is this the best way to fix the issue? Will you be incorporating the
change into the next RB version, and if so, when will that be available?
them with CalcCheckDigit = False. When the report attempts to render
itself to a RAF stream, I get an AV at line 1780 of the ppBarCodDrwCmd unit.
The data I return for the Barcode in the GetFieldValue event is
'5634254096737579', but the FData value just prior to the AV is
'5.63425409673758E15'. Clearly there is a conversion issue here, and
the code does not handle it's input validation very well.
It seems that the data value I return is formatted using
ppDisplayFormat, which for some reason treats the number as a Float
event though the ppField datatype is dtLargeInt. The precision of the
value I pass exceeds the precision of 15 specified at line 183 of
ppDisplayFormat, so I end up with exponential notation, which the
barcode component chokes on. I changed the precision to 16, the barcode
input is preserved, and the barcodes are generated correctly.
Is this the best way to fix the issue? Will you be incorporating the
change into the next RB version, and if so, when will that be available?
This discussion has been closed.
Comments
The datapipeline should only return the raw data that it is given. Neither
the pipeline or the DBBarcode call the ppDisplayFormat class. This class
should be used for text objects such as TppDBText and TppVariable only.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
I'm afraid you must be mistaken Nico.
The AV is in ReportBuilder code, not mine. I am returning the full text
string as I indicated in my post. It is the barcode related
ReportBuilder code that is calling ppDisplayFormat().
All I have done is use a JIT pipeline, return the field value in
GetFieldValue event, and have a ppDBBarcode component in the report.
Please send a small example I can run on my machine in .zip format that
produces this AV to support@digital-metaphors.com and I'll take a look at it
for you.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com