Serialization And Rounding Up
I've been using the Label X of Y command to print serialized labels. The one part that I am stumbling on is when it needs to round up. For example, my database shows 1.5 units. I would need to make 2 labels for that - 1 of 2 and 2 of 2 since I will have a partial unit. How can I get BarTender ro recognize the partial unit as a whole one? In addition, the partial units that need to be shown as a whole unit are not showing up in the end count. The label mentioned previously would show as 1 of 1.
Thank you in advance for your help!
Marjorie
-
You'd need to use Visual basic to handle that. Basically what you're talking about is needing to be able to see if there's anything in the decimal value, strip it off and add 1 if there is.
So in the object, select the 'transforms' tab, then VB Script, Check 'use vb scripting', select OnProcessData, hit edit, then in the script window on the top right try:
test = split(value, ".")if ubound(test) > 0 thenif test(1) > 0 thenvalue = test(0) + 1elsevalue = test(0)end ifend if0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
1 Kommentar