Onnewrecord Condition S’abonner

0
Avatar
Legacy Poster

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.

2 commentaires

0
Avatar
Philip Dea
Modérateur
Actions pour les commentaires Permalien

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
Avatar
Domingo Rodriguez
Modérateur
Actions pour les commentaires Permalien

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.

Vous devez vous connecter pour laisser un commentaire.