GS1 Code 128 Barcode Identifier 320

3 posts, 0 answers
  1. Stephan
    Stephan avatar
    2 posts
    Member since:
    Dec 2017

    Posted 28 Feb 2018 Link to this post

    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. Stephan
    Stephan avatar
    2 posts
    Member since:
    Dec 2017

    Posted 28 Feb 2018 in reply to Stephan Link to this post

    The round() functions seems *NOT to work with decimal places and I don't find any function to add leading zeros. 
  3. Katia
    Admin
    Katia avatar
    693 posts

    Posted 06 Mar 2018 Link to this post

    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
Back to Top