mibuso.com

Microsoft Business Solutions online community
It is currently Sun May 26, 2013 4:14 am

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 110 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6 ... 8  Next
Author Message
 Post subject:
PostPosted: Tue Aug 15, 2006 11:51 pm 
Offline
MVP Microsoft Dynamics NAV
Site Supporter

Joined: Fri Jun 06, 2003 9:01 pm
Posts: 6979
Location: L.I., New York
Country: United States (us)
Infact - it doesn't delete until next time you run the report.
unless you added a FILE.ERASE('c:\barcode\temp.bmp'); line
It should still be there is it ever was created.
see the destination BMP file location

example below..

Code: Select all
OnAfterGetRecord()
IF Item."Item UPC/EAN Number" <> '' THEN BEGIN
CreateBarcode:= SHELL(STRSUBSTNO('%1%2%3%4%5%6',
    'i:\navision attain\Navibar.exe',       // Program location
    ' ' + Item."Item UPC/EAN Number"+'{',   // code to generate from Nav
    '05'+'{',                               // barcode type "code" you want
    '120'+'{',                             // width in pixel
    '50'+'{',                               // high in pixel
    'c:\temp\barcode.bmp'));      // destination for the .bmp-file

Picture.IMPORT('c:\temp\barcode.bmp');
END;


In the report section - Add a Picture Box w/sourceexpr; Picture

I have globals
CreateBarcode -> Integer
Dataitem
Item

Note: possible Barcode Types Codes
00-ISBN
01-EAN 13
02-EAN 8
03-EAN 5
04-EAN 2
05-UPC A <-------------the one I used in the above example
06-Code 39
07-Code 25 interleaved
08-CodeBar
09-Code 25
10-Code 39 Extended
11-Code 128 A
12-Code 128 B
13-Code 128 C
14-Code 128
15-EAN 128
16-EAN 99
17-UPC E
18-PostNet
19-Royal Mail
20-MSI
21-Code 93
22-Code 93 Extended
23-PZN
99-None
-----------------------
I needed to create a sheet of UPC labels depending on an Item# I selected (may not be crystal clear but you get the idea)
**edit link dead**
Updated the Var's to be more readable****

_________________
Harry Ruiz
http://www.cosmeticsolutions.com
http://www.autismspeaks.org


Last edited by Savatage on Mon Feb 06, 2012 5:14 pm, edited 4 times in total.

Top
 Profile E-mail WWW  
 
 Post subject: Navibar.exe
PostPosted: Wed Aug 16, 2006 5:36 pm 
Offline

Joined: Tue Dec 13, 2005 5:12 pm
Posts: 2
Location: Bucuresti
Country: Romania (ro)
Hello!

Do I need to purchase a license for this executable? I have to use it for a client and it would be a real problem if, at some point, I would get a license issue.

Can anyone answer me? I need an answer a.s.a.p.

Thank you


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 16, 2006 5:47 pm 
Offline
MVP Microsoft Dynamics NAV
Site Supporter

Joined: Fri Jun 06, 2003 9:01 pm
Posts: 6979
Location: L.I., New York
Country: United States (us)
it's a free download

_________________
Harry Ruiz
http://www.cosmeticsolutions.com
http://www.autismspeaks.org


Top
 Profile E-mail WWW  
 
 Post subject: Help me - I'm stupid!!
PostPosted: Wed Sep 06, 2006 7:49 am 
Offline

Joined: Wed Sep 06, 2006 7:28 am
Posts: 4
Location: Auckland
Country: New Zealand (nz)
Ok. Clearly I am doing something stupid here. :)

When I run this from the command line it works great!

When I try and run it from Navision (v4.02 on XP) I get

Quote:
You are about to run the following executable for the first time:

Executable: C:\Navision\Tools\Navibar\Navibar.exe,123456789098{01{120{60{C:\barcode.bmp
Parameter:

Please be aware that you may be running an executable that could potentially harm your computer.

Do you trust this executable and its parameter?


Now, I read what was written earlier by philippegirod about having to split the parameters into two arguments and have tried to do this but as you can see from above it is not working - the parameters and executable are all run together on one line and the parameter line is blank.

This is my code

Code: Select all

IF "Cross-Reference Type" = "Item Cross Reference"."Cross-Reference Type"::"Bar Code" THEN BEGIN
  IF "Cross-Reference No." <> '' THEN BEGIN
    lIntOk := SHELL(STRSUBSTNO('%1%2%3%4%5%6',
         '''C:\Downloads\navibar2\Navibar.exe''',          // Programm
         ',''' + "Cross-Reference No." + '{',              // code to generate
         '01' + '{',                                       // EAN13
         FORMAT(gIntWidth) + '{',                          // width in pixel
         FORMAT(gIntHeight) + '{',                         // high in pixel
         'c:\barcode.bmp'''));                             // destination for the .bmp-file

    "Bar Code".IMPORT('c:\barcode.bmp');

  END;
END;


Can anyone please help me find what I am doing wrong?

Thanks
Craig ](*,)


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 06, 2006 9:37 am 
Offline

Joined: Wed Sep 06, 2006 7:28 am
Posts: 4
Location: Auckland
Country: New Zealand (nz)
OK. I think I have got it working - only having read back through this post a dozen times :lol:

Here is my code now...(a report based on a single DataItem - Item Cross Reference)

Code: Select all
Globals
Name   DataType   Subtype   Length
gTxtPath   Text      250
gIntWidth   Integer      
gIntHeight   Integer      


Code: Select all
Item Cross Reference - OnAfterGetRecord()
==========================
Name   DataType   Subtype   Length
lAutWSHOM   Automation   'Windows Script Host Object Model'.WshShell   
lTxtParam   Text      1024
==========================
lTxtParam := 'C:\Downloads\navibar2\Navibar.exe ' +             // Program
             "Cross-Reference No." +'{' +                       // code to generate
             '01'+'{' +                                         // barcodetype
             FORMAT(gIntWidth) +'{' +                           // width in pixel
             FORMAT(gIntHeight) +'{' +                          // high in pixel
             gTxtPath + '\' + "Cross-Reference No." + '.bmp';              // destination for the .bmp-file

CREATE(lAutWSHOM);
lAutWSHOM.Run(lTxtParam);

CheckFileCreated;

CLEAR(lAutWSHOM);

"Bar Code".IMPORT(gTxtPath + '\' + "Cross-Reference No." + '.bmp');
FILE.ERASE(gTxtPath + '\' + "Cross-Reference No." + '.bmp');

MODIFY;


Code: Select all
CheckFileCreated()
==========================
Name   DataType   Subtype   Length
lBolExit   Boolean      
lRecFile   Record   File   
lIntCount   Integer      
==========================
lBolExit := FALSE;
lIntCount := 0;

REPEAT
  lIntCount += 1;
  lRecFile.RESET;
  lRecFile.SETRANGE(Path,'c:\barcode');
  lRecFile.SETRANGE("Is a file",TRUE);
  lRecFile.SETRANGE(Name,"Item Cross Reference"."Cross-Reference No." + '.bmp');
  IF lRecFile.FIND('-') THEN
    lBolExit := TRUE
  ELSE BEGIN
    lRecFile.SETRANGE(Path,'c:\');
    IF lRecFile.FIND('-') THEN;
      SLEEP(100);
  END;
UNTIL lBolExit OR (lIntCount > 1000);


Thanks all for your previous posts and thanks Ralph for putting this together in the fist place - Long live mibuso!!


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 02, 2007 1:38 pm 
Offline

Joined: Wed Jul 26, 2006 9:01 am
Posts: 25
Location: Stuttgart
Country: Germany (de)
Hi,
is it possible to print text as barcode with this barcode generator? For example 'test 123'.


Top
 Profile  
 
 Post subject: Vista
PostPosted: Thu Jul 12, 2007 9:30 am 
Offline

Joined: Thu Dec 09, 2004 2:42 pm
Posts: 3
Location: Belgium
Country: Belgium (be)
Is it possible that the Barcode Generator doesn't work on Vista?


Top
 Profile E-mail  
 
 Post subject: Barcode scanner issue
PostPosted: Tue Oct 30, 2007 11:50 am 
Offline

Joined: Tue Oct 30, 2007 10:07 am
Posts: 2
Location: Singapore
Country: Singapore (sg)
Dear all,

I am quite new to this forum, just joined in 2 hours ago. Currently I need to print the barcode of "Invoice No." on my customized posted Sales Invoice document. My question is more or less the same as the one that was posted by "Navsyst2" dated Feb 02, 2007 "Is it possible to print text as barcode...?"

I understood that barcode generator basically creates the barcode in "bmp" file format and attaches it to "BLOB" field (in this example, the author uses "Picture" field in Item table).

I have reviewed some other barcode objects that were uploaded by some members here - i.e. "Barcode 128 with fonts + sample", EAN13 Barcode Generator (2 other topics). Basically they are able to produce printed barcodes. The barcode for "Invoice No." was nicely printed on my posted Invoice document. However, my problem is that my scanner does not recognize these printed barcodes. When I tried to scan it, nothing was written or produced on my text editors (Notepad, Word, Excel, etc.). For your information, I use cheap "handheld barcode scanner" that is normally used in small retail shop.

Is there anybody experienced this and how to solve it? If I use "proper" barcode printer and print it, my "cheap" scanner is able to recognize this barcode. Do we need to do some adjustments on the barcode scanner itself?

Thanks if anybody could help and give some comments.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Oct 30, 2007 12:13 pm 
Offline
Site Supporter

Joined: Fri Apr 01, 2005 2:05 pm
Posts: 208
Location: Frankfurt
You need to find out more informaation about the barcode you are printing. The font is just that, a font. It does not do things for you like Check Digit and start and end characters. You need to find out what these are for your format and print them too.

for example some barcodes start and end with the * character. Also have a check digit. So to print the number 12345 you might actually have to print *12345x* where x is the check digit.

So:

1) Pick a format that suits you.
2) LEARN about that format (start, end, check characters)
3) Find a font for it and print the full code.


Top
 Profile  
 
 Post subject: [SOLVED] Barcode scanner issue
PostPosted: Thu Nov 01, 2007 5:19 am 
Offline

Joined: Tue Oct 30, 2007 10:07 am
Posts: 2
Location: Singapore
Country: Singapore (sg)
Hi Mauddib,

Thank you for your feedbacks. I followed your instructions by adding '*' on the text to be scanned and set this on the scanner itself. And not it is working.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 01, 2007 10:00 am 
Offline
Site Supporter

Joined: Fri Apr 01, 2005 2:05 pm
Posts: 208
Location: Frankfurt
* was just an example. You need to find out what font you are using.... Code 128, 96 or whatever, and read about that code on the internet and find out what it uses. SOME barcodes use *. Some use other things. Find out what is right for the code you are using.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 01, 2007 3:09 pm 
Offline

Joined: Wed Mar 07, 2007 4:52 pm
Posts: 15
Location: Germany
Country: Germany (de)
Code: Select all
CheckFileCreated()
==========================
Name   DataType   Subtype   Length
lBolExit   Boolean      
lRecFile   Record   File   
lIntCount   Integer      
==========================
lBolExit := FALSE;
lIntCount := 0;

REPEAT
  lIntCount += 1;
  lRecFile.RESET;
  lRecFile.SETRANGE(Path,'c:\barcode');
  lRecFile.SETRANGE("Is a file",TRUE);
  lRecFile.SETRANGE(Name,"Item Cross Reference"."Cross-Reference No." + '.bmp');
  IF lRecFile.FIND('-') THEN
    lBolExit := TRUE
  ELSE BEGIN
    lRecFile.SETRANGE(Path,'c:\');
    IF lRecFile.FIND('-') THEN;
      SLEEP(100);
  END;
UNTIL lBolExit OR (lIntCount > 1000);


Craig.s, thank you for combining the code snippets, but your repeat until loop slows the code down too much. Sleep 100 for 1000 times means 100 seconds to wait if the bmp could not be created.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 01, 2007 5:20 pm 
Offline
Site Supporter

Joined: Fri Apr 01, 2005 2:05 pm
Posts: 208
Location: Frankfurt
Another option if fonts and BMPs arent working for you is to draw your own barcode in the report. This is a time consuming one off job but pays in the long run as you can then simply port your code over to any other reports and print outs.

Simply put:

1) create a BMP which is completely black.
2) Create an array of type INT which is, say, 160 myint[160] for example.
3) Write a function that you feed a value and myint into. The function should map each Alphanumeric character to a binary string of 1s and 0s which it will put into each spot of your array.

4) On your report create 160 bitmap place holders. In each one specify your bitmap list so that for a value of 0 it shows your black bitmap and for 1 it shows nothing. (note some barcodes are the other way around).
5) Each bitmap placeholder should point to myint[1] myint[2] and so on.

Et voila. You feed a value in, you get something like 010101111000011111000011 back and the bitmap is either shown or not accordingly. Not only is it easy but i get MUCH better scan quality in this fashion that with BMP or fonts.

Again I stress the only way to do this is read a webpage on the particular code you want so you know how each character maps to binary, what check digit is needed and what start and end delimeters.


Top
 Profile  
 
 Post subject: Re: Barcode scanner issue
PostPosted: Thu Nov 01, 2007 5:28 pm 
Offline
MVP Microsoft Dynamics NAV
Site Supporter

Joined: Fri Jun 06, 2003 9:01 pm
Posts: 6979
Location: L.I., New York
Country: United States (us)
wq wrote:
However, my problem is that my scanner does not recognize these printed barcodes. When I tried to scan it, nothing was written or produced on my text editors (Notepad, Word, Excel, etc.). For your information, I use cheap "handheld barcode scanner" that is normally used in small retail shop.


Most handheld scanners come with some kind of Decoder & Scanner Programming manual. These manuals "Teach" the scanner how to read different barcodes depending on what you need.

For example we use little handhelds too
http://www.pos-x.com/product.asp?prodid=11 nothing fancy, works great
and the manual to "Teach" it,
http://www.pos-x.com/downloads/Xi1000_p ... manual.pdf

So what i would do is find the maker of your scanner - go to their website and get the manual if you do not have it & program your scanner to read the other types of barcodes.

Or
1)add the invoice# to your report header section
2)Change the Font for that field to BC C39 3 to 1 Narrow
3)install fonts on all computers that are going to print this report http://savatage99.googlepages.com/BarcodeFonts.zip
4)change the SourceExp of your Invoice# field to something like
'*' + "Sales Invoice Header"."No." + '*'

note the *'s are needed on barcode3of9

save, compile, print
ps make sure you make the field a decent size too, something like
width=4500
Hight=1300

good luck

_________________
Harry Ruiz
http://www.cosmeticsolutions.com
http://www.autismspeaks.org


Top
 Profile E-mail WWW  
 
 Post subject:
PostPosted: Tue Apr 01, 2008 1:17 pm 
Offline

Joined: Fri Oct 27, 2006 9:30 am
Posts: 38
Location: Belgium
Country: Belgium (be)
since I need to print 12-digit barcodes, the automatically adding of check digits isn't very helpful to me... Is there a workaround for this?


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 110 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6 ... 8  Next

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum


Search for:
Jump to: