Skip to main content

Search

Search

Qty Per Box

Comments

3 comments

  • Avatar
    Legacy Poster

    I think I have to create 2 VB scripts:

    1 script to calculate the total of labels (boxes): INT(itemqty/amount per box)

    Other script to calculate the box qty current printed label...

     

    If NumberSerializedLabels = Copies Then

        value = MOD(itemqty/amount per box)

    Else

       value = amount per box

    end if

     

    Is this correct?

    Rob

    0
  • Avatar
    Legacy Poster

    Hi,

    I cannot get the right solution. Can anybody help me?

    Calculating the numer of labels is working fine (INT(itemqty/amount per box). Now I would like to print the amount per box on the label...

    How can I see when i'm printing the last copy of the label??

     

    It's driving me nuts!

    0
  • Avatar
    Legacy Poster

    RobW,

     

    Perhaps this is helpful?

     

    File > Print > Serial Numbers (options) > Print Quantity Options window...

    Data Source: Type Visual Basic Script

    Script Type: Single-Line Expression

    Expression:

    IIF( Field("xlsData1$.ShipQty") MOD Field("xlsData2$.Box_Qty") > 0, (Field("xlsData1$.ShipQty") / Field("xlsData2$.Box_Qty")) +1, Field("xlsData1$.ShipQty") / Field("xlsData2$.Box_Qty"))

     

    where ShipQty is total lot quantity and Box_Qty is max quantity per box.

     

    I am having problems beyond this point.

    I am using a serialized counter and single-line expressions track running total based on Box_Qty and ShipQty.

     

    But I am unable to use a comparison of Ship_Qty vs. (serial-counter * Box_Qty) to calculate the remainder, for the last label.

    The comparison fails to detect the shift from Less-Than-Ship_Qty to Greater-Than-Ship_Qty.

     

    IIF( Field("xlsData2$.Box_Qty")*(Format.NamedSubStrings("Serialize").Value+1) < Field("xlsData1$.ShipQty") , Field("xlsData2$.Box_Qty"), (Field("xlsData1$.ShipQty")) - (Format.NamedSubStrings("Serialize").Value * Field("xlsData2$.Box_Qty") ) )

     

    What am I missing/misunderstanding?

     

    Thank you much!

    -sols

    0

Please sign in to leave a comment.