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

TppDBBarCode produces AV when drawing

edited May 2006 in General
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?

Comments

  • edited May 2006
    Hi Larry,

    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

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited May 2006
    Nico Cizik (Digital Metaphors) wrote:
    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.
  • edited May 2006
    Hi Larry,

    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

    Best Regards,

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