This is a migrated thread and some comments may be shown as answers.

Code 128B

6 Answers 340 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Wayne Cook
Top achievements
Rank 1
Wayne Cook asked on 20 Jul 2011, 10:12 PM
I am currently using telerik reporting, and I need to have a barcode printed.  I need to replace an existing barcode using what was told to me to be encoded with Code 128B.  An example text I need to encode is “D00100235373”
When I go to this site and select barcode type 128 and put D00100235373 in the Enter Code Text it generates the barcode exactly the way I want.  Meaning it looks exactly the same as the bar on a document I am replacing.  
http://www.dbautotrack.com/demo/WebDemoBW/Default.aspx

Though, I would love to use Telerik’s barcode control, because it is simpler to use, and I have already paid for Telerik.  
I have tried several things such as below, but I cannot seem to get the same barcode as the one from the above website.  
Symbology = Code128 and Checksum = False
Symbology = Code128 and Checksum = true
Symbology = Code128B and Checksum = False
Symbology = Code128B and Checksum = true

Any help on this would be much appreciated.
Thanks, Tommy

6 Answers, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 21 Jul 2011, 02:42 PM
Hello Tommy,

We did not find Code128B symbology on the site you have referenced, only Code128. Using D00100235373 as Value for the barcode and with some styling of the Barcode, we achieved exactly the same look. Sample report and screenshot from the site are attached for your convenience.

Greetings,
Steve
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

0
Wayne Cook
Top achievements
Rank 1
answered on 21 Jul 2011, 05:47 PM
I loaded the attached project, and it did not seem to match exactly.  I have attached a screenshot of a test project showing the differences. What I see is that using 128 with no chechsum set to false is the closest to what the website has, but it still is not an exact match.   I am just trying to write a report that replaces an existing report.  I just happened to find a site that produced that same result as the document had this is why I am needing it to match the website. 

The version of Telerik report I am using is Q1 2010. if that may matter.

Thanks again,
Tommy
0
Steve
Telerik team
answered on 22 Jul 2011, 07:25 AM
Hi Tommy,

The Reporting version does not matter, but the Barcode is the same - the only difference is its size and the width of of the narrowest bar of the barcode. The Size is controlled through the size property, the width of the bar is control from the Module property. I've left it bigger in the initial reply because I'm almost 99% sure that the Barcode generated from the website cannot be read with a Barcode reader.

I've attached a modified project with those sizes changed. If you still have styling preferences, please play around with the Barcode properties to achieve the exact match you're looking for.

Kind regards,
Steve
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

0
Taylor
Top achievements
Rank 1
answered on 22 Jul 2011, 03:23 PM
The size does not appear to be the issue.  The output from the website is a different set of bars than the one output by Telerik.  Most likely, from what I can tell, Telerik's is more correct.  But that still leaves that report broken.  :-)  Are there any standard manipulations done to the text before you input it to the encoding algorithm that the other site (which does not appear to be run by as robust a company as Telerik) might be skipping?
0
Ivan
Telerik team
answered on 22 Jul 2011, 04:10 PM
Hi Brandon Beam,

According to the Code128 specification this barcode has 3 different subsets: Code128A, Code128B, and Code128C. Each of these subsets can encode a different portion of the ASCII table. Code128 allows to switch between these subsets using special control characters - this makes it possible to encode the full ASCII table with a single barcode. Because the 3 subsets overlap it is possible to encode the same input value in many different ways and the result can still be correct according to the specification. The Barcode item of Telerik Reporting uses an intelligent algorithm to encode the values by switching between the 3 subsets in order to produce the shortest possible sequence of bars and spaces. You can suppress this behavior by specifying one of the Code128A, Code128B, and Code128C subsets manually to the Symbology property of the Barcode item.

Regarding the fact that the produced output from our Barcode item may differ from the output generated by another component - yes it is possible, but this does not mean that either result is incorrect. This simply means that the two components have slightly different implementations, and may handle the optimization of the generated barcode sequence in a slightly different way. The proper way to test your barcodes is to print them and use a barcode scanner, or to export your report to an image with a high enough resolution (e.g. 300 DPI) and then use a barcode recognition software to automate the tests.

Best wishes,
Ivan
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

0
Wang
Top achievements
Rank 1
answered on 13 Mar 2012, 04:05 AM
I've seen the encoded information you have input into the data for Code 128 and Code 128B. Actually for Code 128, it can encode all 128 ASCII data to generate Code 128 images. The three sets of Code 128 differs form their encoding ability which is as below:

For Code 128 A: ASCII characters 00 to 95 (0-9, A-Z and control codes), special characters, and FNC 1-4

For Code 128 B: ASCII characters 32 to 127 (0-9, A-Z, a-z), special characters, and FNC 1-4

For Code 128 C: 00-99 (encodes each two digits with one code) and FNC1

And your  encoding data for Code 128 or Code 128B can both are compatible with, therefore, the generated Code 128 images are the same. However, the check sum digit which is placed at the end of the Code 128 image. In fact, if you set it to be false, it cannot be displayed. So, there is some developing problem on Code 128 check sum digit for the Code 128 generator that you used.
<add removed by admin>

Good luck!

Tags
General Discussions
Asked by
Wayne Cook
Top achievements
Rank 1
Answers by
Steve
Telerik team
Wayne Cook
Top achievements
Rank 1
Taylor
Top achievements
Rank 1
Ivan
Telerik team
Wang
Top achievements
Rank 1
Share this question
or