I need a barcode for each items, how to implement

kevin.7710kevin.7710 Member Posts: 40
I need a barcode for each items, it will automatic making a barcode. now I have not idea to deal with, please help. thanks!

Comments

  • ara3nara3n Member Posts: 9,256
    If you need to print a barcode, I suggest to use 3 of 9 font.

    In navision create a report and change the font on the text box to the font.
    Then go to sourceexp of the text box and add '*' to the begging and the end.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • kevin.7710kevin.7710 Member Posts: 40
    I used free 3 of 9 and change fontname, then change sourceExpr '*' + "field caption" +'*" but it didn't print barcode. then
  • kinekine Member Posts: 12,562
    kevin.7710 wrote:
    I used free 3 of 9 and change fontname, then change sourceExpr '*' + "field caption" +'*" but it didn't print barcode. then

    And the text must be in uppercase...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • garakgarak Member Posts: 3,263
    I use Code 128 because Code39 can handle fewer informations than Code 128.

    With, for example, the font "Code128bWin" you can display your crypted text as barcode. But you must before Crypt your text to code 128. For example with this code:
    Function Code128(PlainText : Text[250]) BarcodeText : Text[250]
    
    //Text as Code128 --> ISO 15417
    //CharSet B
    
    StartStop[1] := 218;
    StartStop[2] := 220;
    CharStart := StartStop[1];
    CharStop := StartStop[2];
    Sum := 104;
    
    FOR i := 1 TO STRLEN(PlainText) DO BEGIN
      CurrChar := PlainText[i];
      Sum := Sum + (i * (CurrChar - 32));
    END;
    
    CheckSumChar := Sum MOD 103;
    
    CASE CheckSumChar OF
      0: 
        CheckSumChar := 176;
      1..94:
        CheckSumChar := CheckSumChar + 32;
      95..101: 
        CheckSumChar := CheckSumChar + 105;
      102:
        CheckSumChar := 213;
    END;
    
    BarcodeText := STRSUBSTNO('%1%2%3%4',CharStart,PlainText,CheckSumChar,CharStop);
    EXIT(BarcodeText);
    

    Regards
    Do you make it right, it works too!
  • kinekine Member Posts: 12,562
    What do you mean with "fewer informations"? You can code lowercase characters and some special characters in 3/9 too. you just needs to use correct control character before each special char (there is basic 3/9 and extended 3/9 character set...)
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • kevin.7710kevin.7710 Member Posts: 40
    I want to convert Item table's No. field, These field contain some upcase characters and some special characters. I install free 3 of 9 font, then I change then fontname to free 3 of 9 ,but it did't display.
  • kinekine Member Posts: 12,562
    The problem can be the "Special characters". You can look e.g. there how to code full ASCII:
    http://en.wikipedia.org/wiki/Code_39
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • ara3nara3n Member Posts: 9,256
    download this report and font and install the font 128 and import the report. .

    Once you've imported the report run and ran it see if you see the font.

    http://mibuso.com/blogs/ara3n/2008/04/24/barcode-128b/


    It could because of double byte characters.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • garakgarak Member Posts: 3,263
    what i mean with fewer is, than he only support letter (A-Z), numbers (0-9) and some special charachters. But the Code 128 supported more charakters.
    Do you make it right, it works too!
  • kinekine Member Posts: 12,562
    garak wrote:
    what i mean with fewer is, than he only support letter (A-Z), numbers (0-9) and some special charachters. But the Code 128 supported more charakters.

    As you can see, 3of9 support whole ASCII... ;-)
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • smatijevsmatijev Member Posts: 12
    kevin.7710 wrote:
    These field contain some upcase characters and some special characters.

    What are those special characters you mentioned? Do you mean '-', '/', '\' or some really special characters like control charactes?
    If font isn't working for you, check http://www.mibuso.com/forum/viewtopic.php?t=1789&postdays=0&postorder=asc&start=0. We printed document numbers in Code 128 (ASCII and '-') and it worked fine.
Sign In or Register to comment.