Calculate Amount To Print By Formula 追蹤

0
Avatar
Legacy Poster

Hi all,

 

I have a simple template of an address label to print on shipment packages. We use two labels on each package which are the same. Therefore, i would like to add a question in the 'data entry form' that asks how many packages the shipment contains. Then a formula should be used for the amount of prints needed.

 

e.g. lets say there are three packages. then it should print 6 labels (3 x 2 = 6 printouts).

Any idea how to tackle this simple problem?

 

Im using bartender professional 10.1 SR2

6 意見

0
Avatar
Legacy Poster
評論操作 永久連結

Nobody has an idea? :(

0
Avatar
Ian Cummings
版主
評論操作 永久連結

Create a named data source for your data entry item.  Let's call it "btPackages" for example.

 

From the Print dialog choose to data source the print quantity for the number of copies and choose a "VB Script - Single Line Expression" for the data source type.  Edit the script and enter in the below expression:

 

Format.NamedSubStrings("btPackages").Value *2

0
Avatar
Legacy Poster
評論操作 永久連結

Thanks Ian, that did the trick!

0
Avatar
Legacy Poster
評論操作 永久連結

Hi,

 

I have a question regarding the same topic.

 

I created a btw template file with several page templates,

 

Templates include a header, a body (several different templates) and a trailer. in the body I'm choosing which template to use depending on a value in the database file (trigger file).

 

The question is: is it possible to determine the amount of times a template page within the template needs to be printed by a value in the trigger file?

 

example:

 

header

label 1

label 2

label 2

label 2

trailer

 

Label 2 is printed 3 times due to a number 3 in the trigger file.

 

Any help would be much appreciated.

0
Avatar
Ian Cummings
版主
評論操作 永久連結

juanktoro: Nope, it's not possible to data source the quantity to print for a single template in a document that contains multiple templates.  I guess that if the top number of variable quantity templates to print isn't too great you could have a separate template (copy) for each template that is to conditionally print, but of course such a solution isn't particularly scalable if you could have a great many "label" templates.

0
Avatar
Legacy Poster
評論操作 永久連結

Hi

I am very new to Bartender.  I am trying to calculate KGs based on a field BoxWt in a trigger file.  This file does not have headers.

I have set up a share/name on the label format for the field BoxWt (set up as an integer)  and called that BoxWt also.  I am using the following formula to calculate Kgs:

Round(CSng(Format.NamedSubStrings("BoxWt")* .4536),2)

 

I get the error:

OnAutoSelectedExpression(line 1): :Type mismatch: '[string: ""]'

 

I get this error whether I use the CSng function or not.  It is not saying the field BoxWt is a mismatch, just the string: "".

 

Can someone help me with the correct syntax for a Single-Line Expression to formulate this?

 

Thank you

登入寫評論。