Onnewrecord Condition
Is it possible that at OnNewRecord, I check certain field of the record and it did not meet my criteria, I decide not to print this record?
Thank you.
Thank you.
0
-
As of the latest version (9.40 SR3), BarTender does not offer the ability to use VB Script code embedded within the label to dynamically control whether to print individual label/record. ie., it's possible to cancel the entire print job altogether, but not stop the printing of a single database record.
In order to do that, you will need to use automation methods from outside of the label (e.g., create external application to use ActiveX/.net SDK to integrate with BarTender).0 -
As a test, you could write some VBScript inside BarTender, in particular the VBScript you can enter for the number of identical copies to be printed. This option can be found under the "File>Print" dialog by now pressing the "Options..." button which is on the same line as the number of identical copies. Set this dialog to "Set by Data Source", select the "Data Source" tab and now either choose "Visual Basic Script" as the Source or press the "More Options..." dialog and do a "OnProcessData" VBScript.
The following example:
If Field("data.code") = "No" Then
value = 0
Else value = 1
End If
In this case, if the content of a particular database field is "No" then the number of identical copies to be printed is 0 and the record won't print. Otherwise, the number of copies is 1 and the label will print.0
請登入寫評論。
評論
2 條評論