Barcode 128 with fonts + sample

Administrator
Member, Moderator, Administrator Posts: 2,506
Barcode 128 with fonts + sample
With this font and encode function you can create a barcode in Navision.
The CODE 128 barcode is an alphanumeric barcode with a checksum. It is widely used an can be read by most scanners. The TTF is freeware.
http://www.mibuso.com/dlinfo.asp?FileID=405
Discuss this download here.
With this font and encode function you can create a barcode in Navision.
The CODE 128 barcode is an alphanumeric barcode with a checksum. It is widely used an can be read by most scanners. The TTF is freeware.
http://www.mibuso.com/dlinfo.asp?FileID=405
Discuss this download here.
0
Comments
-
Hi,
there is a little problem while creating the barcodes.
i want to generate a barcode for the string
'0101001LSRC699243'
the result is
'š0101001LSRC699243Çœ'
which can not be displayed by the .ttf font...
what can i do?0 -
I downloaded the Barcode 128 fonts and everything is working fine with one exception.
First, I created a barcode for Item No. TP057 to be scanned in the Navison Invoice. This works fine. What I would like to do next would be to create a Barcode as TP057<TAB>01<TAB>01 and when this barcodes is scanned, it should enter TP057 for Item No., 01 for Variant Code and 01 for Quantity. Those three columns are side by side and in the right order. The string to generate the barcode is:
TPO57”i01”i01”m
where
TAB = ”i
RETURN = ”m
If I scan the barcode in Notepad, it writes TP057 01 01 which means it is recognizing the TABs and everything is working fine, however in Navision it writes the whole string in the Item No. field as TP0570101 and it doesn't recognize the TABs. I tried the same thing using RETURN instead of TABs. and again it works in Notepad but the same thing happens in Navision.
Does anyone know how to create a Barcode 128 for Navision that will fill in more than one field at once?
Thank you!
Mario0 -
Hi All,
I'm the fellow that created the Code 128 Barcode Font listed above. I'm not sure I can be of any help in this forum, as I'm not overly familiar with Navision, but if I can be of help please feel free to contact me. In terms of this:'0101001LSRC699243'
the result is
'š0101001LSRC699243Çœ'
The ' character is encodable within the Code 128 specification. I suspect that character is not being fed properly to the script. Any Navision Gurus know why the ' would not be properly passed?The Free Barcode Font Guy0 -
Hello!
I'm having similar problems with this barcode function. It seems that the checksum character is not included in the bar code font.
I'm not sure whether this is a problem with the function itself or the barcode font. Is it possible that the checksum character is e.g. "Ä", "Ö" or "Å"? If not, then the function itself is causing this error...
Below is the code. The "ChecksumChar" variable probably gets a wrong character (eg. above mentioned Ä, Ö or Å)? Someone who is experienced with Navision programming should check if the code meets the barcode 128 standard. Unfortunately, I'm not so experienced :-/
Regards,
Timo Tasala
Finland
StartChar:='š';
StopChar:='œ';
Checksum:=104;
FOR i:=1 TO STRLEN(pText) DO BEGIN
currentchar:=pText;
Checksum := Checksum +(i*(currentchar-32));
END;
ChecksumChar:= Checksum MOD 103;
ChecksumChar:= ChecksumChar+32;
// convert SPACE to ALT+0128
pText:=CONVERTSTR(pText,' ','€');
RetVal:=STRSUBSTNO('%1%2%3%4',StartChar,pText,ChecksumChar,StopChar);
EXIT(RetVal);
0 -
I am having the following problem:
The checksum can be a value between 32 and 135 (mod 103 + 32).
Then why can I not print a checksum value between 129 and 135?
(the following symbols are used: ‚ƒ„…†‡)
Should I convert value higher than 128 or change other settings?0 -
2tje wrote:I am having the following problem:
The checksum can be a value between 32 and 135 (mod 103 + 32).
Then why can I not print a checksum value between 129 and 135?
(the following symbols are used: ‚ƒ„…†‡)
Should I convert value higher than 128 or change other settings?
I had the same problem with this barcode font. Eventually I discovered through trial end error the correct mapping for 4 of the 6 values. However never could discover the last two chararcters....
My solution to this was to purchase a barcode font which had it's mapping well documented. Adjusting the code for a Font of which the mapping is known is easy.
I got the font from here: http://www.elfring.com/bar128.htm
Hope this helps 8)0 -
I tried running the sample report and I am getting rectangular boxes at the begining and end of the barcode.. What is that and how do I get rid of it.
Thanks,0 -
Please note the documentation that comes with this font appears to be a bit misleading especially when it comes to working out the correct checksum digits to show.
For the record the start, stop, space and other characters appear to be incorrectly documented. Corrections are shown below;
Code 128 Variant B Documented ASCII Equiv Actual ASCII Equiv
0 {SPACE} (128) Ç (176) €
95 DEL (145) æ (200) ‘
96 FNC 3 (146) Æ (201) ’
97 FNC 2 (147) ô (202) “
98 SHIFT (148) ö (203) ”
99 CODE C (149) ò (204) •
100 FNC 4 (150) û (205) –
101 CODE A (151) ù (206) —
102 FNC 1 (152) ÿ (213) ¤
103 START A (153) Ö (217) ™
104 START B (154) Ü (218) š
105 START C (155) ø (219) ›
106 STOP (156) £ (220) œ
Documentation says that to convert the 128 code to the ascii equivalent you need add 32 if your barcode < 95, or you add 50 if it is greater. It also says that barcode character 0 should be converted to 128.
Only the bit about adding 32 appears to be correct.
The original Navision code
ChecksumChar:= ChecksumChar+32;
Should be replaced with
CASE ChecksumChar OF
0: ChecksumChar := 176;//B0h
1..94: ChecksumChar :=ChecksumChar+32;
95..101: ChecksumChar := ChecksumChar+105;
102: ChecksumChar := 213; //D5h
END;0 -
Hi all,
Thanks for giving this Download..
I downloaded this report and am able to generate the report using the fonts given in this Download.
But , It is not scanning in the Label area and also in the A4 sheet. and also am getting to boxes say like this am getting the generated barcode ]||||||||[.
The Code Length to generate Barcode is around from 16 - 18.
My code wiil be like this EX::PY00000RDLLGXXXX
Please give me suggestions to resolve this Issue.0 -
you can try and use the following example and download the report.
http://mibuso.com/blogs/ara3n/2008/04/24/barcode-128b/0 -
ara3n wrote:you can try and use the following example and download the report.
http://mibuso.com/blogs/ara3n/2008/04/24/barcode-128b/
doesnt work folks...
If I import this report and try it with Item."No." instead of Search Description and then I print a barcode, my barcode reader won't be able to read it. Plus it must be wrong because it looks not how it has to.
Here you can check how it has to look like:
http://www.bcgen.com/linear-barcode-creator.html
I used the font attached i used other fonts nothing.
maybe someone can help me0 -
hello,
i have a problem creating a 128 barcode with the sourcecode found in this topic:
http://www.mibuso.com/dlinfo.asp?FileID=405
checked with both fonts: Code128bWin and Code128bWinLarge
in 99,9% the created barcode is OK but in some cases it doesn't work:
Values:
AA/L2.665 --> OK
AA/L2.666 --> NOT OK
AA/L2.667--> OK
any ideas?
regards
dule0 -
i replaced the code
//ChecksumChar:= ChecksumChar+32;
CASE ChecksumChar OF
0: ChecksumChar := 176;//B0h
1..94: ChecksumChar :=ChecksumChar+32;
95..101: ChecksumChar := ChecksumChar+105;
102: ChecksumChar := 213; //D5h
END;
and it seems to work...0 -
Has Anyone got this working please??
I'm figting this for two days now and still unable to get a good read... The checksum calculation I've modified to the last post, but no progress.
I suspect the problem is with start and end codes, often start and end characters shown as two boxes...
The font enclosed in the package is comin from this site and the font table documentation shows that START B (C128B=104) should be value 154 and END (C128B=106) should have the value 156.
http://freebarcodefonts.dobsonsw.com/Code128Transformation.htm
The report restored at my end shows start and end characters as 'Ú' and 'Ü' while many of th eprevious post indicate these chars show as 'š' and 'œ'. I suspect this might be due to server locale that steps in and translates to local non-unicode codepage and my server has Traditional Spanish locale setup (I have experieced this problém in the past that some special chars were changing in our environment).
Looking into the report at my system, I see that start and stop codes have hex values of DA and DC, ie. dec 218 and 220 respectively which does not match any of the value shown in the transformation table above and thus only confuses me...
So I tried withvarious combinations of start and stop code to no luck.
Have anyone been able to get this working and with what stop-start code values for Code128bWin font please??
Thanks and regards,
Jan
I0 -
I replaced the written code by dule0612 with the next code and then it works:
CASE ChecksumChar OF
0 : ChecksumChar := 8364; // (Hex:20AC) (Alt+0128)
1..94 : ChecksumChar += 32;
95 : ChecksumChar := 8216; // (Hex:2018) (Alt+0145)
96 : ChecksumChar := 8217; // (Hex:2019) (Alt+0146)
97 : ChecksumChar := 8220; // (Hex:201C) (Alt+0147)
98 : ChecksumChar := 8221; // (Hex:201D) (Alt+0148)
99 : ChecksumChar := 8226; // (Hex:2022) (Alt+0149)
100 : ChecksumChar := 8211; // (Hex:2013) (Alt+0150)
101 : ChecksumChar := 8212; // (Hex:2014) (Alt+0151)
102 : ChecksumChar := 732; // (Hex:2DC) (Alt+0152)
END;
Regards! Antonio.1 -
Hi,
i have Troubles with this in NAV 2016 - the StartChar and the StopChar don't work. Is there any solution?
Best Regards
Dietmar0 -
Use the below
StartChar:='š';
StopChar:='œ';0 -
Tharanga_Chandrasekara wrote: »Use the below
StartChar:='š';
StopChar:='œ';
Hi, after i compose the code 'š' change to 's' and 'œ' change to 'o' . how to fix get it work, please help.0 -
Here is the working solution that handles characters of the whole set of 103 of possible check sum values. Code128 values 0 and 95..103 have been visually verified
PROCEDURE EncodeBarcode128B@1000000032(pText@1000000000 : Text[250]) RetVal : Text[250];
VAR
ChecksumCode128@1000000004 : Integer;
i@1000000002 : Integer;
currentchar@1000000003 : Char;
ChecksumChar@1000000006 : Char;
Code128@1000000005 : Integer;
ASCII@1000000007 : Integer;
SpaceChar@1000000001 : Char;
BEGIN
//Barcode 128 variant B
//to be used with following fonts ONLY: Code128bWin.ttf , Code128bWinLarge.ttf
//fonts can be downloaded here
//http://freebarcodefonts.dobsonsw.com/downloads/fonts/freeware128font.zip
ChecksumCode128:= 104;
FOR i:=1 TO STRLEN(pText) DO BEGIN
currentchar:=pText;
ChecksumCode128 := ChecksumCode128 +(i*(currentchar-32));
END;
ChecksumCode128 := (ChecksumCode128 MOD 103);
CASE ChecksumCode128 OF
0: ASCII := 8364;
1..94: ASCII := ChecksumCode128+32;
95 : ASCII := 8216;
96 : ASCII := 8217;
97 : ASCII := 8220;
98 : ASCII := 8221;
99 : ASCII := 8226;
100 : ASCII := 8211;
101 : ASCII := 8212;
102 : ASCII := 732;
103 : ASCII := 8482;
END;
ChecksumChar:= ASCII;
SpaceChar:= 8364;
pText := CONVERTSTR(pText,' ',FORMAT(SpaceChar));
RetVal[1] := 353; //start Bar
RetVal+=pText+FORMAT(ChecksumChar);
RetVal[STRLEN(RetVal)+1] := 339; //stop Bar
EXIT(RetVal);
END;0 -
I've used the above function it works.0
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