Code 128 / GS1-128 in NAV 2016

mrettler
Member Posts: 17
Hi there,
I'm struggeling in implementing a Code 128 C in Navision.
The code128 file comes from this site : http://www.dafont.com/de/code-128.font
Currently I'm not able to place the right Start,Stop and FNC1 Character in Navision. I searched the whole web for a solution but i couldnt find it.
If i use the normal ASCII charset for that it doesent work. http://www.adams1.com/128table.html
Does anyone ever had the same issues? Or does anyone build his own Code128C BarCode in Navision?
Thanks in advance
I'm struggeling in implementing a Code 128 C in Navision.
The code128 file comes from this site : http://www.dafont.com/de/code-128.font
Currently I'm not able to place the right Start,Stop and FNC1 Character in Navision. I searched the whole web for a solution but i couldnt find it.
If i use the normal ASCII charset for that it doesent work. http://www.adams1.com/128table.html
Does anyone ever had the same issues? Or does anyone build his own Code128C BarCode in Navision?
Thanks in advance

0
Answers
-
Hi, Code128 is not only about the start/stop characters. Also if you have font from GrandZebu, you are using wrong char table. You can find the correct one here:
grandzebu.net/informatique/codbar-en/code128.htm
Tested in NAV and works fine.Regards
xStepa1 -
Hi xStepa, thanks for your answer! I'll check that and will give you a feedback.0
-
So i tested it with your char table and Code A and Code B are working fine. But when i try to use Code C with some FNC1-Flags in it, im not able to read the BarCode with an App like "Barcode Scanner".
Here is my Code:LOCAL EncodeBarcode(pText : Text[250]) RetVal : Text[250] StartChar:= 210; StopChar:= 211; //Checksum start for Code C Checksum :=105; counter :=0; FOR i:=1 TO STRLEN(pText) DO BEGIN counter += 1; //Check if Char is FNC1 IF pText[i] <> 207 THEN BEGIN currenttxt:= STRSUBSTNO('%1%2',pText[i],pText[i+1]); EVALUATE(ChecksumInt, currenttxt); Checksum := Checksum +(counter * ChecksumInt); i+=1; END ELSE BEGIN Checksum := Checksum +(counter * 102); END; END; ChecksumChar:= Checksum MOD 103; //Create ChecksumChar based on ASCII-Table CASE ChecksumChar OF 0 : ChecksumChar := 212; 1..94 : ChecksumChar += 32; 95 : ChecksumChar := 200; 96 : ChecksumChar := 201; 97 : ChecksumChar := 202; 98 : ChecksumChar := 203; 99 : ChecksumChar := 204; 100 : ChecksumChar := 205; 101 : ChecksumChar := 206; 102 : ChecksumChar := 207; END; RetVal:=STRSUBSTNO('%1%2%3%4',StartChar,pText,ChecksumChar,StopChar); EXIT(RetVal);
I call this function like this, where FNC1 hast the value 207:EncodeBarcode(STRSUBSTNO('%1%2%3', FNC1, '00', ItemLedgerEntryRec2."SSCC No."));
I dont know why espacially the Code C does not work.0 -
You can't sum the pairs in your checksum - only the final chars ...
(3754 => EV => 1*E + 2*V) - calculate the checksum from the result string:checksum := EncodedNumber[1] - ' ' - 73; FOR i := 2 TO STRLEN(EncodedNumber) DO BEGIN IF EncodedNumber[i] <= 126 THEN checksum += ((i-1) * (EncodedNumber[i] - ' ')) ELSE checksum += ((i-1) * (EncodedNumber[i] - ' ' - 73)); END; checksum := checksum MOD 103; IF checksum <= 126 THEN EncodedNumber += GetStringFromOrdinal(checksum + 32) ELSE EncodedNumber += GetStringFromOrdinal(checksum + 32 + 73); EncodedNumber += GetStringFromOrdinal(211); EXIT(EncodedNumber);
EDIT: Sorry, should be the same, but your RetVal seems to be wrong, since the pText is not encoded ...Regards
xStepa0 -
Hello,
I've found this post due to a problem. In our customers with navision 2016-2018, we've installed the barcode management objects downloaded from this web page. Everything was working perfeclty, until one customer changed the requisites. Now, instead of Code128, they must print barcodes ein GS1-128. What changes must be do for this aim?
Thank you all0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions