Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Barcode GS1 128c

Status
Not open for further replies.

crpryor1

Programmer
Mar 25, 1999
21
US
I need help with a routine for zip code printing (Barcode GS1 128c). I have Googled the internet for information and have some. Right now I am lost not sure where to start. This may be over my head. Could you send me to the right place or give me some advice.

XP, VFP 7, VFP 9

Thanks In Advance
Chuck
 
What part are you having trouble with?
1. Finding the font
2. Capturing the barcode
3. Printing the barcode?


Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
ReFox XI (www.mcrgsoftware.com)
 
Typically printing barcodes in an application is nothing more than installing the associated font onto the workstation and then within the VFP Report Form specify the use of the desired font within the Form's Textbox where the barcode is to reside.

Obviously the character string to be represented in the barcode needs to be determined prior to doing the REPORT FORM MyReport.

By Zipcode barcode I am guessing that you mean the Postnet barcode.

In order to determine what infomation you need to 'gather' prior to printing, you might want to Google for "Postnet" specification.
One search result is: Or, even better:
Good Luck,
JRB-Bldr
 
Mike
Where do I get the font and and how do I build the character string.
chuck
 
Use Google to locate where you can get the font.

You will need to determine if the 'Correction Character' (typically a CRC value) is auto-generated within the font itself or if it needs to be calculated separately and appended to the barcode string.

Once you know that you would use your VFP programming skills to build the appropriate character string within your VFP application.

Something like:
Code:
cPostnetStr = cZipcode + cZip4 + cDeliveryPt + cCRC

Good Luck,
JRB-Bldr


 
As a follow-up I did some checking and determined that most of the Postnet fonts require you to calculate the CRC value yourself.

Additionally you need to add a Start and Stop character to the barcode character string.

Each font vendor may represent these Start and Stop characters in their own means so read the specifications on the particular font set you acquire.

For example one font vendor uses the "(" and ")" characters to respectively represent the Start and Stop characters.

The CRC is calculated in the following manner:
The correction character is always the digit that, when added to the sum of the other digits in the barcode, results in a total that is a multiple of 10. For example, the sum of the ZIP+4 barcode 12345-6789 is 45. The next higher multiple of 10 is 50, so the correction character is "5" (50 minus 45).

So that means that once you have your CRC value calculated then, if you were using the above mentioned vendor's barcode font, you would build the Barcode character string as:
Code:
cPostnetStr = "(" + cZipcode + cZip4 + cDeliveryPt + cCRC + ")"

Good Luck,
JRB-Bldr
 
JRBBLDR
Thank you for your information and work. But this has to be done with GS1 128c. I have been playing with the code and have some of it done, I guess what I need is the font to test it.
format is
start code+fnc1 code+AI code+Zip code+check digit+stop code.
Chuck
 
If you have done a Google for GS1 128c you will see that that barcode font is not available or does not exist as such.

However if you Google for "GS1-128" you will find several sites.

One of them is:
And the US Postal Service reference:
Again, read the specifications closely to determine what the Barcode character string needs to contain and then test it.

Good Luck,
JRB-Bldr
 
After reading some of the GS1 specification I have to say....
Wow you are in for a lot of fun! NOT!

The GS1 symbology specification and start-up process looks very similar to and as convoluted as the UPC one.
GS1:
This is obviously more complicated than the Postnet process that I assumed you needed when you originally said that you needed "a routine for zip code printing"

Fortunately you can skip things like:
Step 3: Select a Bar Code Printing Company
Step 4: Select a "Primary" Scanning Environment
since you will be doing the printing yourself as well as the scanning for initial print confirmation.

The VFP work relatively easy and no more difficult than we discussed above, but the other aspects such as getting the company GS1 registered, building an item-by-item 'catalogue' with pre-assigned numbers, etc. will be what takes a while.

Good Luck,
JRB-Bldr
 
Chuck... the character string is dependent on the required 'start' and 'stop' character for the Postnet specification.

As to where to find the font, I would do a google search to see if anyone has it available for free download... otherwise you will have to purchase it.

Andy Snyder
SnyAc Software Services Hyperware Inc. a division of AmTech Software
 
This may be simpler than I first thought.
The GS1 specification goes on-and-on-and-on and has caused me to think that this is much more complicated than it need to be.

On: the Application Identifier (AI) is defined to be "420"
Note that this is a 3-character string.

Looking at the "ASCII Method" described on: it seems to that the FNC1 character should be ASC(213) for a 3 digit AI

And some web references imply that the CRC character should be a MOD 10 value and other references imply a MOD 103 value. I'll leave it to you to determine which is correct.

Again the Start & Stop characters need to be clarified by vendor.
Are they auto-generated?
Are they separately entered as part of the character string?
And, if input, what are they for this vendor's font?

Once you are certain of the specific character string for each of the sub-components your barcode string would be:

cFNC1 = CHR(213)
cBarcodeStr = cStartChar + cFNC1 + "420" + cZipcode + cCRC + cStopChar

Good Luck,
JRB-Bldr
 
You may want to take another direction and print this to a label printer such as Zebra. This would not require you to have a barcode font. In this scenario, you would send the printer programming codes based on their programming language.

I'm not 100% sure about this but, from Wikipedia, GS1-128 was formerly known as UCC/EAN-128. When I looked this up in the "EPL2 Programmer's Manual" it is an available Bar Code. Google for the manual.

This may look strange, but here is an example of this type of EPL2 program code.

N
B10,10,0,1E,3,7,200,B,"your barcode data"
P1


The "1E" designates the barcode as UCC/EAN-128.

You would then send this out to your Zebra Printer by putting that into a string, and then using the triple ? command.

TEXT TO lcPrinterCode NOSHOW
N
B10,10,0,1E,3,7,200,B,"your barcode data"
P1
ENDTEXT

lcPrinterDriver = GETPRINTER() && get your Zebra printer

SET PRINTER TO NAME (lcPrinterDriver)
??? lcPrinterCode


Hope this helps!
Bob Ethridge
 
Bob - the barcode symbology is still Code 128, but Chuck is looking to implement the utilization standard of GS1-128.

The variety of standards that Code 128 can be used include: ISBT-128, GS1-128, UCC-128, EAN-128 and USS Code 128

So while a barcode printer can indeed utilize native barcode fonts for a little less 'hassle' at the Report Form end, the barcode string still needs to be created to meet the utilization standard.

And really once the barcode strings are determined, the difference between printing with a VFP Report Form utilizing a specialized installed Windows Font and printing to a 'genuine' barcode printer with internal fonts is almost insignificant.

Good Luck,
JRB-Bldr
 
Good Points, however my intention was to show future readers an alternative to Report Form with installed fonts for bar codes.

Thanks,
Bob
 
Thanks for all of the help.
I had to buy a font from IDautomation and am stating over.
There instruction are not real clear so it will be trial and error procedure. I have to give the output to the post office to verify. this will be slow process. Right now the string that I am sending to the font for zip code "15102-1144" is "start code C + ~213420151021144 + check digit + Stop code". Not sure how long the post office will take.
Again Thanks for the help
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top