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

GS1 Code 128 Barcode Identifier 320

2 Answers 201 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Stephan
Top achievements
Rank 1
Stephan asked on 28 Feb 2018, 04:53 PM

Hi,

I am creating a label in report designer which will include a Code128 barcode. The barcode will include the identifiers 01,13,320 and 21. 

GS1 identifiers: https://www.gs1-128.info/application-identifiers/

I am stuck with building the identifier 320 net-weight in pound (two decimal places --> 3202). Within the database I find values like 7.4563 or 34.2300 or 101.1000, etc. My question is how to round the value, get rid of the separator and to add leading zeros? Values should look like 000746, 003423 and 010110.

The round() functions seems to work with decimal places and I don't find any function to add leading zeros. 

Any help is greatly appreciated! Thanks!

2 Answers, 1 is accepted

Sort by
0
Stephan
Top achievements
Rank 1
answered on 28 Feb 2018, 04:54 PM
The round() functions seems *NOT to work with decimal places and I don't find any function to add leading zeros. 
0
Katia
Telerik team
answered on 06 Mar 2018, 10:56 AM
Hello Stephan,

To complete the task, my suggestion is to treat the data fields as strings, conversion can be done using CStr() function. After that, you can use text functions (the combination of Join(), Len(), Split()) to format the text and append the leading zeros.
For more details about built-in function check this article.


Regards,
Katia
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
General Discussions
Asked by
Stephan
Top achievements
Rank 1
Answers by
Stephan
Top achievements
Rank 1
Katia
Telerik team
Share this question
or