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

Code 39 Barcode prefix needed.

edited January 2013 in General
Question: When printing a barcode label w/Code39 format, and it is
reading an integer field as a value, anything with a value of over 3
digits long the bar code scanner works fine. But, with a value of 2
digits or less the scanner cannot read.

Now, there is probably a setting in the scanner to correct this, I just
have not found out how. So, since the multiple scanners I have cannot
read a 1 or 2 digit barcode, how can I put a prefix of 00 or 0 in front
of the barcode so it makes the number/label read 001 or 011 accordingly.

I have tried assigning 000 as the display format of the integer field of
the file, also on the DBPipeline which works on the screens in the pgm,
but does not on the RB barcode label

Any ideas?

Thanks,
Chris Starre

Comments

  • edited January 2013
    Hi Chris,

    Rather than using a DBBarcode, try using a normal Barcode component and
    manually giving it data to process.

    Inside the DetailBand.BeforePrint, manually retrieve the data value from
    your DB, format it, then assign it to the Barcode.Data property.
    Something like the following...

    procedure TForm1.ppDetailBand1BeforePrint(Sender: TObject);
    var
    liValue: Integer;
    lsData: String;
    begin

    liValue := ppReport1.DataPipeline['BarCodeDataField'];
    lsData := FormatFloat('000', lValue);

    ppBarCode1.Data := lsData;

    end;

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited January 2013
    Thank you. Works like a charm.
    Once again, Fantastic Support!

    Take care,
    Chris

This discussion has been closed.