Need To Be Able To Print Out The Last Carton Qty, Which May Be An Odd Lot S’abonner

0
Avatar
Legacy Poster

I have a formula that calculates the total number of cartons based on the total quantity divided by the quantity per carton. This is great if the quantity per carton is the same, but in many cases, the last carton may be less than the rest of the cartons. I know what the qty of the last carton is, but how do I output the last label with this qty?

8 commentaires

0
Avatar
Legacy Poster
Actions pour les commentaires Permalien

I "butchered" an old label I had that used VB to calculate this and i have attached the trimmed down copy which you may be able to use to help you with this.

0
Avatar
Legacy Poster
Actions pour les commentaires Permalien

Pete,

 

That is exactly what I was looking for, Thank you!

0
Avatar
Legacy Poster
Actions pour les commentaires Permalien

I cannot open the file, it's created on a newer version of the software.  Can you extract out the VB code and post it here?

Thanks,

1
Avatar
Legacy Poster
Actions pour les commentaires Permalien

Reposted the file as a v9 label

0
Avatar
Legacy Poster
Actions pour les commentaires Permalien

Pete,

Thanks for the template.  It works great if the total items / qty per container is a whole number or a decimal > .5 (rounds up).  If this number is a decimal < .5 (rounds down) then the last label will have the qty per plus the remainder.

Ex: I used 110 total items and 12 per box.  The actual number of labels with two decimal places is 9.17.  Since this rounds down we get 9 labels.  The last label then has a qty per of 14. 

We really need 10 labels with a qty per of 2 for the final label.

I have fiddled with your code but I am not quite up to speed with the Bartender structure yet and I have been getting odd results.  Any help with this would be much appreciated.

 

Thanks,

EdK

0
Avatar
Seb Atkins
Actions pour les commentaires Permalien

Hi

I have also used this template to try and accomplish this it works great!

the only issue i am having is that i have two quantity fields coming in from my database and depending on whether the one called "quantity" is populated depends on which field gets used. I have mapped these to two named data sources (qtyrcv and quantity).

I have changed the totalqty field into a Visual Basic Script (Multi Line Script) and entered the below VB

If (Format.NamedSubStrings("quantity").Value="") Then
Value=Format.NamedSubStrings("qtyrcv").Value
Else
Value=Format.NamedSubStrings("quantity").Value
End IF

The issue i am now having is i am getting an error when trying to print now

I have checked the rest of the scripts and i cant see any issues,

Anyone have any ideas?

 

Thanks in advance!

 

0
Avatar
Hayden Edwards
Actions pour les commentaires Permalien

I can't get this file :(

0
Avatar
Seb Atkins
Actions pour les commentaires Permalien

Vous devez vous connecter pour laisser un commentaire.