EAN 128 MSG ( The code C portion must contain an even number of digits )
Hi,
I need to print 'UCC / EAN 128 C' and i?m using the Barcode Component from
Report Builder 9.01 on Delphi7. After reading a few days and lot of
documents to drive me crazy about creating UCC/EAN128 barcodes i think
that i?m close to actually printing some that actually work.
this is how im doing :
//#210= Start C, #207=FNC1
ppBarcode_cima.AutoEncode := False;
ppBarCode_cima.Data := #210#207 + '02' + Edit_GTIN.text + '37' +
Edit_qty.text + #207 + '10' + Edit_lote.Text;
example values:
Edit_GTIN.text := 5601406000059
Edit_Qty.text := 3000
but im getting the msg error "The code C portion must contain an even
number of digits" in the preview. Why?
Thanks in advance
Joao Silva
--- posted by geoForum on http://delphi.newswhat.com
I need to print 'UCC / EAN 128 C' and i?m using the Barcode Component from
Report Builder 9.01 on Delphi7. After reading a few days and lot of
documents to drive me crazy about creating UCC/EAN128 barcodes i think
that i?m close to actually printing some that actually work.
this is how im doing :
//#210= Start C, #207=FNC1
ppBarcode_cima.AutoEncode := False;
ppBarCode_cima.Data := #210#207 + '02' + Edit_GTIN.text + '37' +
Edit_qty.text + #207 + '10' + Edit_lote.Text;
example values:
Edit_GTIN.text := 5601406000059
Edit_Qty.text := 3000
but im getting the msg error "The code C portion must contain an even
number of digits" in the preview. Why?
Thanks in advance
Joao Silva
--- posted by geoForum on http://delphi.newswhat.com
This discussion has been closed.
Comments
Below is a post from another customer with some similar problems. Perhaps
the information will help you as well. We apologize, in all honesty our
knowledge of barcode symbologies is lacking.
First be sure you have the AutoCode property set to Falses. The RB barcode
components originated as a stand alone barcode component that we acquired
from another company. The original developer of the component was very much
an expert in barcodes and had tested the barcode output with a variety of
barcode readers.
---
I have seen the standard RB response when people ask about EAN128 (I've
posted below for reference).
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
--------------------------------------------------------
Tech Tip: UCC/EAN 128 Barcode Generation
--------------------------------------------------------
ReportBuilder's support for the Code 128 barcode symbology can be used to
print UCC\EAN 128 barcodes.
Code 128 is general purpose symbology that can be used to generate UCC/EAN
128 barcodes.
1. Here is a link that came up when I searched in Google. It is for another
barcode product, but it explains the symbology.
http://www.idautomation.com/code128faq.html#EAN128andUCC128
2. The TppBarCode component contains an AutoEncode property that defaults to
True. To support UCC/EAN 128 you will need set AutoEncode to False and
manually encode the data. See the AutoEncode topic in the RBuilder.hlp. From
there you can access a related topic on manually encoding Code 128 data.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
i made some tests and if i take off #207 (FUNC1) from the end of quantity
field i get no messages and it prints the code. But in the end of any
variable AI field must have the #207 (FUNC1) except if the field is the
last one. So, why it shows the message "The code C portion must contain an
even number of digits" when i put #207 after quantity field (Edit_qty)?
Anyone knows whats wrong?
Thanks in advance
Joao Silva (Portugal)
--- posted by geoForum on http://delphi.newswhat.com