Home General

EAN-128

edited October 2010 in General
Anyone know how to specifically print the EAN-128 barcodes as opposed to
generic code128 barcodes

Thanks,
Kevin Day

Comments

  • edited October 2010
    Hi Kevin,

    ReportBuilder does not natively support EAN 128 barcodes however it is
    possible to use the Code 128 setting to manually encode and display these
    barcodes. We have numerous customers successfully using Code 128 to display
    EAN 128 barcodes.

    1. See the following article on using Code 128 to display EAN 128 barcodes.

    http://www.digital-metaphors.com/rbWiki/RCL/BarCode/UCC_and_EAN_128

    2. See the information below posted by another customer on their
    experiences. The information below refers to the article above.

    ------

    With regard to point 1, that link takes you to a page which shows the USS
    Code-128 Character Set. They show Start A as being #203, but in the RB help
    files in the section on Manually Encoding Data for Code 128, Start A is
    #208. In fact, for all of these function codes, all the RB Codes are +5
    higher than the ones shown on this web page (another page
    http://grandzebu.net/informatique/codbar-en/code128.htm also uses #203 for
    Start A). Why are the RB codes different?

    With regards to point 2, I have AutoEncode set to False. Sometimes I can set
    a value to Data and its ok. Othertimes I can set Data to a value and it RB
    displays an message box with an empty message. So it appears to still be
    doing some sort of encoding/check anyway. What's going on? I think what is
    happening is that I was using Character set C which seems to require an even
    number of numbers. Character Set A seems to be more successful. A nicer
    error message would have saved me a lot of time.

    After several hours of struggling and going by a very torturous route, I
    finally seem to have been able to print EAN128 barcodes with multiple
    segments separated by FNC1 by doing something like this:

    ppBarcode1.AutoEncode := False; ppBarcode1.Data :=
    #208#207+'01121221'+#207+'17060310'; //#208= Start A, #207=FNC1

    It seems to print and scan correctly. One interesting side effect though is
    that Char Set A is supposed to support uppercase characters only. But when
    it scans they show in lowercase.

    Char Set C does give a much more compressed barcode. If you can use numbers
    and if you make sure each segment has an even number of digits (it doesn't
    seem to matter if the overall length is even, each segments seems to need to
    be even), then you should use Set C like this:

    ppBarcode1.AutoEncode := False; ppBarcode1.Data :=
    #210#207+'01121221'+#207+'17060310'; //#210= Start C, #207=FNC1



    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited October 2010
    Thanks your Niko,

    How does one do this in RAP. The method of encoding characters in
    Delphi does not work in RAP.

    The line:

    Barcode1.Data := #210#207+'01121221'+#207+'17060310';

    Gives a compile error

    Also using
    Barcode1.Data := Chr(210) + Chr(207) +'01121221'+chr(207) +'17060310';

    doesn't work either. Upon preview the error is returned that the
    start character must be either #208, #209 or #210


    Thanks,
    Kevin.

  • edited October 2010
    Hi Kevin,

    Be sure you have the AutoEncode property set to False.

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited October 2010
    Hi Niko,

    Yes I did.

    This is the onprint handler in the calc tab of the barcode component

    begin
    Barcode1.Autoencode := False;
    Barcode1.Data :=
    #210#207'19330913000052'#207'3880'#207'17120921'#207'100539';

    end;

    This gives a compile error of:

    Error : Barcode2OnPrint, Lines 4: Expected: 'end' or 'not', but Found '#'

    Using RB Ent 11.08

    Thanks,
    Kevin.

  • edited October 2010
    Hi Kevin,

    Yes, this will give you an error because RAP does not support the "#Char"
    format. In my testing the following code successfully compiled in RAP and
    created a valid barcode.

    Barcode1.AutoEncode := False;
    Barcode1.Data := Chr(210) + Chr(207) + '19330913000052' + Chr(207) + '3880'
    + Chr(207) + '17120921' + Chr(207) + '100539';

    --
    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.