Barcode not printing from Navision report

Hi,

I have installed two barcode fonts (‘IDAutomationHC39M’, ‘Free 3 of 9’) in my system, and it working fine if I print from Excel, word…etc.

I tried both two fonts as the ‘Font Name’ property of one ‘Tex box’ control in my Navision Report, but it is NOT working.

When I researched on this, I got to know that, this is because of the Arabic font I installed in the system, because when I try to preview the same report/DB by connecting from another system, the barcode shows fine.

But, barcode prints fine in Excel and other application in the system where arabic is installed, why this barcode is not working only in Navision ??.

Any one could help me on this ??

[:^)]

When you say it’s not working, do you mean it “looks” like a barcode but it doesn’t scan or it doesn’t look like a barcode at all?

Hi Abdul,

Since “NOT working” is a bit too general of a diagnosis to base a specific answer on, I’ll only comment on my recollection of having worked with the 3-of-9 barcode font in NAV in earlier versions. The first thing to remember is that, when producing a barcode that you want to use for data entry, you can’t just print the value of the data field and get away with it. You also need to wrap the data value with leading and trailing commands that the barcode scanner will interpret as instructions rather than data. Also, there are certain characters that require special attention, like non-printing characters like space, tab, crlf, etc. that you will need to handle in NAV code before printing the barcode. And lastly, you’ll be doing a lot of work with individual ascii characters to compose the string that ultimately becomes the barcode. If you have a good text editor, it will likely include an ascii chart that maps keyboard characters to their hex and dec equivalents. Pay very close attention to these, and be aware that, at least as recently as the 4.x versions of NAV, assigning a character value within NAV code using an expression like MyChar : = 13 will produce NAV’s interpretation of that value, and may yield a character that does not match the corresponding character in the ASCII chart. And, since 3-of-9 looks for symbols and not ascii values, this slight variation in character mapping can drive you mad when trying to sort out problems with getting printed barcodes to scan properly.

So, I know that’s a long answer, and it may not even address your issue. If not, maybe you can offer a bit more detail about what’s actually happening or not happening that’s causing you problems?

Hi,

Any body could help me on this?

I have arabic font installed systed, Why barcode not printing only in Navision in this system? barcode works in excel, word… etc.

[:@]

any body could could track this ?

Did you try it with *'s round the field?

for example:

Font Name = BC C39 3 to 1 Narrow

SourceExp = ‘’ + “Sales Header”.“No.” + '

A font like this does not work with our the asterisks around it.

or you can try all code & eliminate the font.

http://mibuso.com/dlinfo.asp?FileID=1043

Hi Savatage/George,

It does not appear as barcode, it prints only * and numbers (10254534566). it works in other applications. I think some thing to do with arabic font installation, when I try the same in another system where arabic not installed by connecting the same database,it prints as barcode, not number.

And, I am trying to print item number from the ‘Item’ table.

I have added * on both sides.

George, Let me go in detail about your instruction, it seems to be little complicated.

Thank you both,

Hi George/Savatage,

I got it [Y], this was because Navision does not recognize ‘Non Unicode’ as barcode in Arabic. so, I tried to print it as picture by using the tempblob table. Now I have codes that converts these texts to image and save to picture box control.

Thank you.[8-|]

So, when you’re trying to print the barcode from NAV, you just get straight text characters on the paper? The first thing I would check in that case would be the font name property for the barcode control in your report. Make sure it matches the name of the barcodefont you’ve installed. You’ve mentioned that the barcode renders correctly from other systems, so this may not be the issue. But it may also be that, on your problem system, the font name you’ve specified in NAV for the control doesn’t match what’s installed.

On the question of characters and ascii mapping, try this. Just make a report based on the Integer table, range 1 thru 255. Create 2 columns of output. The first is Integer.Number, and the second is ToChar(integer.number), where ToChar is a function that takes an integer as an argument and returns a CHAR. Print that. Then open your text editor and display the standard ascii chart. Compare each line of your output to the lines in the ascii chart, looking for values in the second column of your output that don’t match the chart. When you find mis-matched values, you’ll want to write code to correct the character value when you’re creating the barcode string. So this is all going from memory. I haven’t worked with this for quite some time. The landscape may have changed. I’m thinking of the old adage “When you hear hoofbeats, don’t think zebras.” You’ve already identified that you’re only having problems on the system that has your Arabic font installed. Your solution might be as simple as accepting that the barcode fonts don’t work from your current version of NAV on systems where the Arabic font is installed?

Hi George,

I am using older version, nav 4.03. I thing, this problem may not be there for the new version.

Converting it to image and printing is cool. It works good and speed now… Thank you.