跳至主內容

搜尋

搜尋

Printing multiple pages

評論

4 條評論

  • Avatar
    pthane

    I know I have posted something up like this before in a previous forum query but couldn't find it. 

    I am not sure what restrictions there are on the Ultralite edition but this works with a full version as per the image below:

    This process uses 5 fields to perform the two tasks, the four text fields in red are the names used to make them value fields Named Data Sources, such as

     

    The 5 value fields do not need to all be printed but just need to exist on the label template and, if not required on the printed label itself, then they can be dragged off to the side of the template outside of the printed area. The TotalCount and BoxQty can be sourced from a database or print time prompts etc. if required.

     

    The NoOfLbls field is set as an Event Controlled VB Script routine. For my test label the TotalCount value is being entered on a Data Entry Form and so I have set the VB to run OnPostPrompt but if your field data is coming from a Database then you could adjust this to OnNewRecord. The VB I used for this is as follows:

    Value1 = Format.NamedSubStrings("TotalCount").Value

    Value2 = Format.NamedSubStrings("BoxQty").Value

    Value = Value1/Value2

    Value3 = Round(Value,2) 

    Value3 = Value *100

    Value3 = Right(Value3,2)

    If Value3 > 0 then

    Value3 = 1 

    Else Value3 = 0

    end if

    Value = Int(Value)

    Value = Value + Value3 

    For line 1 type in Value1 = and then double click on the TotalCount name shown in the Named Data Sources option in the column on the right. Repeat this process for second line and the Value2 and BoxQty 

     

     

    Note: I set the the OnAutoSelected event for this string to Value = 1 to give the field a default value on the screen when you open the label.

     

    For TheCounter field using the Transforms options to serialise this field with a rest of Every Job.

     

    The VB script used for the Items per Label value field (not NoOfLabels as originally posted) is again set as an Event Controlled string but this time configured to OnIdenticalCopies and the VB used is as follows, but make sure to add the Format.Named...... items by clicking on the appropriate option in the right hand column, as above. The OnAutoSelected event for this I have used Value = 0

    Value = Format.NamedSubStrings("BoxQty").Value

    Value1 = Format.NamedSubStrings("TheCounter").Value

    Value2 = Format.NamedSubStrings("NoOfLbls").Value

    If Value1 = Value2 then

    Value3 = Format.NamedSubStrings("NoOfLbls").Value -1

    Value3 = Value3 * Value

    Value3 = Format.NamedSubStrings("TotalCount").Value - Value3

    Value = Value3

    else Value = Value

    end if

    Value = Value

     

     

     

     

     

    1
  • Avatar
    Yen Chang

    Thanks Peter Thane  great help , i'm will  follow your step to run it 、understand it and feedback again  
    I follow as above procedure but cannot get my expect result,so post what i do and point me what i do wrong
    as below result is page preview,just 1 label only。




    1.environment

    2.my template

    3.left side text properties

    4.(total count) & (Box Qty) tab setting

    5.NoOflbls tab setting

    6.counter tab setting


    this is my first time for bartender design , many common sense not enough, post my all step  hope can point what i'm wrong and fix it。

    if i miss provide any information pls tell me 

    Final the item per label how to configuration this parameter 。


    0
  • Avatar
    pthane

    It looks like you haven't added a value field for the number of items but instead have applied the VB to the counter text filed (field 9).  Change the counter back to an Embedded Data type and then add a new text item one  set a VB>Event Controlled Script and add the code to that.

    You have jumped in at the deep end with BarTender labels if you are having to add VB Script routines to your labels! 

    0
  • Avatar
    Yen Chang

    Hi Peter great thanks to help , function work perfectly

    take note 
    1.follow as above procedure
    2.TotalCount and BoxQty can be sourced from a database
    3.The NoOfLbls is mean what's number you need to printed and input by manual (stuck in here long time)
    4.File > Print > Serial Numbers > select get quantity from data source > point to NoOfLbls

    0

登入寫評論。