Printing "box 1 Of X" Number Follow

0
Avatar
Legacy Poster

Hello all,

I'm new to this forum and I need some help in designing a label for some shipping cartons. The number of cartons vary depending on the order but what I would like is for one of the text fields on the label to show "Box 1 of 20" (this assumes the total number of boxes is 20).

I can setup a User Prompt to say "Enter Total # of Cartons", what I don't know how to do is to get the number to increment for each label. Say we enter 5 for the Total # of Cartons, the first label would show "Box 1 of 5", the next label would be "Box 2 of 5" and so on.

Is there an easy way of doing this?

Thanks very much

4 comments

0
Avatar
Shotaro Ito
Moderator

Hi sfgman63,

Use serialization for that.
For counting up text, create a text with value "1", then Modify > Data Source > More Options > Serialization, Enable serialization. (Disable "Update substring after print.")
For number of total cartons, create a text and set datasource as VB Script > Event Control Script > Edit.
In OnAutoSelectedEvent and OnPostPrompt event, enter script
[code]Value = Format.NumberSerializedLabels[/code]

Sounds too much? Open Toolbox at left > Components tab > Serialization, you have a component named "Label X of Y". drag that into label.

You can enable user prompt for Number of Serialized Labels, from Print dialog > Quantity > Number of serialized labels > options,
select [Set by data source] (Datasource tab appears.)
Open the datasource tab, enter "1" as screen data, then enable prompt by [More options] > Prompting tab.

Hope that helps!
0
Avatar
Legacy Poster

Hi Shotaro,

Thanks so much for your help, it works perfectly!!!

Perhaps you can help with another issue I have with serialization.

I've got a label that's 10 digits in length. The last 4 digits is serialized and what I need to do is reset the last 4 digits back to 0001 every Monday. Currently I do this manually by selecting the data and putting it back to 0001 but is there an automated way of doing this?

Thanks again for your help.
0
Avatar
Shotaro Ito
Moderator

BarTender doesn't have a function to reset serial number periodically.
So - again, you need some scripting.

By using Date datasource's format "Week of Year", you can indicate number of weeks from the first day of year.
What if you keep this number in format, then compare current week and week in last time?

To reset serial number, you need to have the serial number on user prompt.

Create 3 named susbtrings:
SERIAL: Screen data "0001" Enable serialization(Update sub string after print Enabled). Enable user prompt(Update sub string after print Enabled).
THISWEEK: Date(Week of Year 1-2 digits Start from Monday)
LASTPRINTEDWEEK: Screen data

and a text with VB Script datasource.

In OnPrePrompt event, have script like this..

[code]If THISWEEK <> LASTPRINTEDWEEK Then
SERIAL = "0001"
LASTPRINTEDWEEK = THISWEEK
End If[/code]

Note this will reset serial number for first prompt shown on the week, and [u]on first day of the year[/u] too.
0
Avatar
Legacy Poster

HELLO
Im printing a sequence of photos to make a rotoscopy but I cant find a way of printing a page number or file name for each frame.. does any1 know how can I add a numeration to be printed?
Thanks

Please sign in to leave a comment.