Saltar al contenido principal

Búsqueda

Búsqueda

Need Help in creating a Serialized field that does not increment the control digit but calculates it

Comentarios

1 comentario

  • Avatar
    pthane

    As this looks like it could be a Portuguese 13 digit EAN then that would mean you need to add a UCCMod10 calculated check digit to the code. 

    If you are printing an EAN13 barcode then the process would be fairly simple in that you would need to break down your string in the constituent parts, namely the Country & Company ID/reference separated from the serialised element allowing BarTender to calculate the check digit.   To do this make the barcode out of two separate substrings using the New Data Source button and then add the appropriate elements to each, missing off the check digit,  making sure to set the second field to serialise. 

     

    If this is not for an EAN barcode then the process would be similar in that you would need to split the two elements again but then add a 3rd VB script string to calculate the check digit. To use the VB for each of the other two elements use the Change Data Source Name button to give them each a name, I called mine BaseNo and SerNo with the SerNo shown below and again remember to enable serialisation for this string

    The VB substing should be configured as an Event Controlled Script and then click the Edit button.

    You could leave the Autoselected event as it is (ie Value = "Sample Text") but so it shows up as the right length on the screen I changed mine to Value = "X"

    • Now on the column on the left click on OnSerialise.
    • In the edit box type Value = 
    • From the column on the right double click on your first string to add the details in the edit box 
    • Now type <SPACE> & <SPACE> and again in the column on the right click on your second string.
    • Next on a new line type Value = and then from the Column on the right open the Functions and Check Digits option and click the type digit you require (I used the UCCMod10) 
    • This will add UCCMOD10(string) in the edit box, with the word string highlighted just type Value to replace this and click Close to finish

     

    When printed the barcode and text strings should look like this

    0

Iniciar sesión para dejar un comentario.