Label X of Y フォローする

1
Avatar
Navreet Athwal

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!

4 コメント

0
Avatar
Peter Thane
コメントアクション Permalink

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
Avatar
Peter Thane
コメントアクション Permalink

....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
Avatar
Navreet Athwal
コメントアクション Permalink

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
Avatar
Peter Thane
コメントアクション Permalink

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

  1. Embedded data with a default value of 1 set in Transforms to Serialise, Increment and reset to 1 after Every Job
  2. Embedded data " of "  (ie with a space either side of the of
  3. Database field linked to your total column

ログインしてコメントを残してください。