Generating Barcodes

gcoutogcouto Member Posts: 11
Hi all,

I'm using Barcode Generator v2 to generate barcodes and in my computer it works fine. But when i try to use it in another computer it gives an error telling that the file name contains an illegal character. I thinks that it appens because the operating system don't allow "{" in the shell command. It's the only cause I suspect. Please does anyone know how to allow "{" in the sheel command or other way to make it work???.

Thanks.

Comments

  • PhennoPhenno Member Posts: 630
    gcouto wrote:
    Hi all,

    I'm using Barcode Generator v2 to generate barcodes and in my computer it works fine. But when i try to use it in another computer it gives an error telling that the file name contains an illegal character. I thinks that it appens because the operating system don't allow "{" in the shell command. It's the only cause I suspect. Please does anyone know how to allow "{" in the sheel command or other way to make it work???.

    Thanks.

    have you tried to enclose it in quotes?
  • gcoutogcouto Member Posts: 11
    Phenno wrote:
    gcouto wrote:
    Hi all,

    I'm using Barcode Generator v2 to generate barcodes and in my computer it works fine. But when i try to use it in another computer it gives an error telling that the file name contains an illegal character. I thinks that it appens because the operating system don't allow "{" in the shell command. It's the only cause I suspect. Please does anyone know how to allow "{" in the sheel command or other way to make it work???.

    Thanks.

    have you tried to enclose it in quotes?

    Hi,

    I haven't tried to enclose in quotes. I thought that if it works as it is in my machine it would work on other else. When i tried and it didn't worked the first think i thought was "The problem must be on the operating system because it works fine in my machine". There is something i forget to tell that is I developed the functionality in 3.70 and know i´m trying to use in 4.00 SP1. Can this be the problem?.

    Please I need your help.

    Thanks.
  • PhennoPhenno Member Posts: 630
    I had not use barcode gen. before so, sorry, no help from me if the problem is in it.
  • ara3nara3n Member Posts: 9,257
    Is there a special requirement that you need to use the barcode generator. You can simple use 3 of 9 which is just a font and you can get for free just search on the web. Install 3 of 9 and then in your report, change the font to 3 of 9 and change source expression from lets say "No." to '*'+"No."+'*';
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • CtrlShiftF11CtrlShiftF11 Member Posts: 29
    I agree with ara3n that the Bar Code font is a simple and easy solution to this issue. However, you must remember that any client that is going to use Form or Report objects which are to display Bar Codes must have the font installed on it as well. A word of advice, go big with the Bar Code fonts if you're making cheat sheets to scan.

    Back to deployment, if you're using Citrix Servers (pulished apps, virtual desktop, etc.) then it is very easy as you can just make sure that the 3 of 9 font is installed on all servers in the farm - if not then I hope that you have a small Navision installation and that all of your users are in one building. Good luck - Andy.
    :-k
  • Miklos_HollenderMiklos_Hollender Member Posts: 1,598
    No. In countries which do not use ASCII charsets, bar code fonts don't work with Navision. The reason is the following: Navision will check whether ALL fonts of the local codepage are available in the font - even though you don't use anything else but digits - and silently switch back to standard fonts if any local font is unavailable. And bar code fonts usually implement only the ASCII charset - I tested a lot of them and none of them supported Latin-2. Asked MS support - at the time of 4.0 no SP - and they said this behaviour won't be expected to be repaired soon, because it's hardcoded quite deep in the client.
  • Miklos_HollenderMiklos_Hollender Member Posts: 1,598
    Some tips about bar code printing here (but it does not cover this issue)

    http://www.mibuso.com/forum/viewtopic.php?t=7819
  • SavatageSavatage Member Posts: 7,142
    gcouto wrote:
    Hi all,

    I'm using Barcode Generator v2 to generate barcodes and in my computer it works fine. But when i try to use it in another computer it gives an error telling that the file name contains an illegal character.

    Maybe we can go back to this...

    What's the difference between the two? OS version? Regional settings?

    here my code
    OnAfterGetRecord()
    IF NOT ae.GET("No.","Sales Unit of Measure") THEN CLEAR (ae);
    IF Item."Item UPC/EAN Number" <> '' THEN BEGIN
    ok:= SHELL(STRSUBSTNO('%1%2%3%4%5%6',
        'i:\navision attain\Navibar.exe',       // Program
        ' ' + Item."Item UPC/EAN Number"+'{',   // code to generate
        '05'+'{',                               // barcodetype
        '120'+'{',                              // width in pixel
        '50'+'{',                               // high in pixel
        'c:\temp\bild.bmp'));                   // destination for the .bmp-file
    
    Picture.IMPORT('c:\temp\bild.bmp');
    END;
    
  • gcoutogcouto Member Posts: 11
    Savatage wrote:
    gcouto wrote:
    Hi all,

    I'm using Barcode Generator v2 to generate barcodes and in my computer it works fine. But when i try to use it in another computer it gives an error telling that the file name contains an illegal character.

    Maybe we can go back to this...

    What's the difference between the two? OS version? Regional settings?[/b]

    here my code

    OnAfterGetRecord()
    IF NOT ae.GET("No.","Sales Unit of Measure") THEN CLEAR (ae);
    IF Item."Item UPC/EAN Number" <> '' THEN BEGIN
    ok:= SHELL(STRSUBSTNO('%1%2%3%4%5%6',
        'i:\navision attain\Navibar.exe',       // Program
        ' ' + Item."Item UPC/EAN Number"+'{',   // code to generate
        '05'+'{',                               // barcodetype
        '120'+'{',                              // width in pixel
        '50'+'{',                               // high in pixel
        'c:\temp\bild.bmp'));                   // destination for the .bmp-file
    
    Picture.IMPORT('c:\temp\bild.bmp');
    END;
    

    Hi,

    That's what I'm trying to obtain and when I have it all I'll report you for more help. (Ex: I'm using XP SP2 in my machine and I don't know if the other as it and so on).

    Thanks for the tips.
  • Miklos_HollenderMiklos_Hollender Member Posts: 1,598
    Have you tried running it manually, or at least running "te{st" at the command prompt?
  • gcoutogcouto Member Posts: 11
    Have you tried running it manually, or at least running "te{st" at the command prompt?

    Hi,

    Now I can answer to your question.
    Yes I tried it manually at command prompt ant it worked well, so the problem isn't with the operating system but it is in NAV.
    I spoke to a friend and he told me to convert ANSI character to ASCII character but I don't know how to convert it and using the ASCII character at the SHELL command in NAV.
    I found a converter here in the forum but it not converts the character '{'.
    Please can you help me :? ...
    Do you think that if I convert from ANSI to ASCII the problem would be fixed?.

    I need your help (I don´t know what to do...),

    Thanks for your time.
Sign In or Register to comment.