Problem With Code 128 Barcode From Navibar in a PictureBox.

JohnieG
Member Posts: 56
Hi to All,
I have a problem that is driving me a little bit crazy!!! I am using Navibar to create bmp's with Code 128 barcodes in order to print them in a Navision 4 SP2 report. The problem is that the bmp's themselves are being scanned perfect when printed through a Word file or an image control through a Navision Report, but they somehow becoming unreadable when they are being printed through a picturebox control via a Navision report.
I have stored the same bmp in a BLOB file and called it through a picturebox on a report but still with no succes in scanning.I need to point out that the barcodes are printing, but i believe that they aren't printing in the correct dimensions (something that I have already measured!!!).
Is there any other way or control that I can use in order to print out a BLOB field that stores a barcode bmp with scanning success?Does anyone else uses Navibar alongside with code 128 bmp's in reports?I am in desperate need of help so any suggestions are more than welcome.
Thank you in advance...
I have a problem that is driving me a little bit crazy!!! I am using Navibar to create bmp's with Code 128 barcodes in order to print them in a Navision 4 SP2 report. The problem is that the bmp's themselves are being scanned perfect when printed through a Word file or an image control through a Navision Report, but they somehow becoming unreadable when they are being printed through a picturebox control via a Navision report.
I have stored the same bmp in a BLOB file and called it through a picturebox on a report but still with no succes in scanning.I need to point out that the barcodes are printing, but i believe that they aren't printing in the correct dimensions (something that I have already measured!!!).
Is there any other way or control that I can use in order to print out a BLOB field that stores a barcode bmp with scanning success?Does anyone else uses Navibar alongside with code 128 bmp's in reports?I am in desperate need of help so any suggestions are more than welcome.
Thank you in advance...
Always Look On The Bright Side Of Life...
0
Comments
-
I would check the dpi of the bitmap, it possible that when it get printed it is distorting the image slightly.
I have also used a barcode font to handle printing code 128 barcodes on a report as it's much easier to implement and they always scale and scan find although it does have the overhead of ensuring the the font is intalled on everyon'e machine who needs to run the report.0 -
Thank you for your reply AntHillMob but I don't think that this is the problem. If something was wrong with the dpi of the bitmap then why MSWord prints it ok but Navision doesn't?
I believe that the picturebox decides by itself on how it will handle the picture (Normal,Stretch,Zoom, etc.) thus resulting in making the printout unreadable to the scanner.
Furthermore, I am trying to use a barcode font but with no success (my luck keeps going better and better!!!). Although I am putting the correct name on the font property of the textbox the result is to print the numbers and letters of the code and not the barcode itself. I am very frustrated and disappointed...Always Look On The Bright Side Of Life...0 -
1) May be you are missing some basic things how to create correct barcode within NAV (prefix/suffix etc.) and Word and other applications are solving that automatically?
2) Check other posts about barcode fonts and the codepage problem. Sometime you need to modify the font to be able to use it in non-English environment...0 -
Thank you all for your replies,
As I mentioned above I have used Navibar to create the barcode bmp's. So I don't understand why the SAME bmp file that I print through Word scans OK but the SAME bmp file when I am printing it using a picturebox with Navision doesn't! My guess is that the picturebox somehow alters the overall dimensions of the bmp file thus resulting in a different print than the original file. Is there any way that I can adjust the picturebox not to make any conversion at the original picture? Can I use any other control (or trick?) with which I could print a bmp to a report? (I guess not...!!!). Isn't there anyone out there that is printing Code128 barcodes with Navibar through a Navision report???Always Look On The Bright Side Of Life...0 -
I suggest to look at this solution for printing code128 barcodes.
http://mibuso.com/blogs/ara3n/2008/04/0 -
Thank you ara3n,
I forgot to mention that my regional settings are set to Greek! The function worked with no problem but the font seemed to worked at 80% because isntead of a start and a stop character it draw two little squares thus resulting in an unreadable barcode. I tried to alter the font code page character ranges with font creator but with no success.
Any advice...???Always Look On The Bright Side Of Life...0 -
did you try this
http://www.mibuso.com/dlinfo.asp?FileID=405
in my example you have to play with
highAscii := 66;
newCodeString[1] := offset + highAscii + 104;
and
holder := 106 + offset + highAscii;
newCodeString[STRLEN(newCodeString)+1] := holder;
FOR rCounter := 1 TO STRLEN(newCodeString) DO
IF(newCodeString[rCounter] = 32) THEN
newCodeString[rCounter] := 177;
to get it to print the right character.0 -
Thank you ara3n for your post!!!
I have tried your function GetBarcode alongside with a font IDAutomationSC128M which is a Demo Font from ID Automation. It seems to be printing fine except of the space character (it prints me again a little rectangle instead of the character barcode).
But what do you mean that I have to play with the code to print the right character. Is there any formula that I have to follow or is there any special character that I have to print according to the font that I am using???
Thank you all in advance for your essential help in this issue!Always Look On The Bright Side Of Life...0 -
There is a formular. I've followed the following website specs.
http://freebarcodefonts.dobsonsw.com/Co ... mation.htm
and sample code based on other langauges.
http://freebarcodefonts.dobsonsw.com/Code128Samples.htm0 -
Thank you all for your interest and your posts.
Finally, I had no luck with the picturebox and navibar. So I have started to test alternative solutions. The least time consuming and easy to implement alongside with my previous implementations is the one that offers a company named Tec-IT. They offer a solution similar to Navibar at very good price and with excellent results.For all of you that you want to take a look follow the link below:
http://www.tec-it.com/en/software/barco ... fault.aspx
Consider This Topic Closed!!!Always Look On The Bright Side Of Life...0 -
Hey, guys. I need your help. I think you must have rich experience in creating Code 128. I want to create some Code 128 barcodes in VB.NET. I am new to this. I googled and found many tools like this. I do not know how to choose. Must I use such a tool? Can you give me, this new man, some suggestions. Thanks. By the way, I copied a sample code to create Code 128 in my VB.NET, But it can not work. Here is the sample code:
Imports OnBarcode.Barcode
Dim barcode As Linear = New Linear
'Code 128 Barcode Basic Settings
barcode.Type = BarcodeType.CODE128
'Code 128 Valid data char set:
'all 128 ASCII characters (Char from 0 to 127)
barcode.Data = "112233445566"
'Set the ProcessTilde property to true, if you want use the tilde character "~"
'to specify special characters in the input data. Default is false.
'
'1) 1-byte character: ~0dd/~1dd/~2dd (character value from 000 ~ 255);
' Strings from "~256" to "~299" are unused
'2) 2-byte character (Unicode): ~6ddddd (character value from 00000 ~ 65535)
' ASCII character '~' is presented by ~126;
Strings from "~665536" to "~699999" are unused
barcode.ProcessTilde = True
' Barcode Size Related Settings
barcode.UOM = UnitOfMeasure.PIXEL
barcode.X = 1
barcode.Y = 80
barcode.LeftMargin = 0
barcode.RightMargin = 0
barcode.TopMargin = 0
barcode.BottomMargin = 0
barcode.Resolution = 96
barcode.Rotate = Rotate.Rotate0
' Barcode Text Settings
barcode.ShowText = True
barcode.TextFont = New Drawing.Font("Arial", 9.0F, Drawing.FontStyle.Regular)
barcode.TextMargin = 6
' Image format setting
barcode.Format = System.Drawing.Imaging.ImageFormat.Gif()
barcode.drawBarcode("c://code-128.gif")
I have already read the guide of barcode data encoding in VB.NET. I could not figure this out.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