Label X of Y
Hello. my datasrouce is an excel file. In the excel file I have one column that will have all the box count. The rows could alway be different depending on the order. How can I add all the numbers in the column and then use that on the x and y.
For example, if there are 20 rows and the each box count is 1 per call that would be total for 20 boxes.
Now on the label we want to show 1 of 20, 2 of 20, 3 of 20, 4 of 20 and so on through the records.
Appricate any help!
-
Peter Thane
★ BarTender Hero ★
I do not think this is possible. I believe BarTender will only "look" at the contents of each record as it prints them and so will not be able to add up the values from each record beforehand. There is a way to do it retrospectively but that is no good for an X of Y type scenario that you are looking for.
The simplest way to achieve this would be to do this calculation in your spreadsheet and on the 1st record add a column that sums the appropriate column for all the records. On each subsequent record, make the value the same as the 1st record. You can then link the Y value to this field in your data table.
0 -
Peter Thane
★ BarTender Hero ★
....if there are 20 rows/records and you only wanted to print one label per records, then there is actually an option to get the total in 2019 as you can use Total Number of Records option from the Print Job Fields item in the Data Sources toolbox
0 -
Navreet Athwal
★ BarTender Hero ★
Thank you very much.
I like the idea of caculating it in the excel sheet and then linking to Y. Is there any documentation on how to do that? I looked in the script for Y but not sure how to link a excel cell to the Y.
0 -
Peter Thane
★ BarTender Hero ★
I assume from your original post that your label is connected to the Excel Spreadsheet already and so all you would need to do is link the "Y" field to the appropriate column in your database.
Personally I would make the X of Y field made up of 3 separate substrings as per the image below
- Embedded data with a default value of 1 set in Transforms to Serialise, Increment and reset to 1 after Every Job
- Embedded data " of " (ie with a space either side of the of
- Database field linked to your total column
0 -
Eduardo Teixeira
★ BarTender Hero ★
Hi, is it possible to resume printing of a "X of Y" job if the labels got jammed? I mean, it´s a 100 labels job and it got interrupted when the 90th of 100 lable was printed. Is there a way to print from 91th to 100th?
0 -
Peter Thane
★ BarTender Hero ★
If the label is configured as above with Y value coming linked to the number of serialised label values then no.
However if you resaved your label under a new name (so your usual label is not adjusted) and then remove the connection between the Serial Numbers and the database field then you can achieve this.
To do this click on the button to the right of the Serial Numbers box on the Print Dialog screen and then in the next screen change the option from the database field or Data Source option and click on the Print Dialog option as the source. Once you complete this you can now set the number of labels to print manually on the Print Dialog screen whilst leaving the Y value still linked to the database. To adjust the X value, you will need to amend the value in the Embedded Data box of the text object.
0
Please sign in to leave a comment.
Comments
6 comments