Print IF DataSource Equals Other DataSource
I need to set the following:
-- OnPrintJobStart
-- IF "Named Data Source A" = "Named Data Source B"
-- THEN DON'T Print
-- INSTEAD display custom message
Please let me know how to set this in the correct SYNTAX in the VB SCRIPT Editor
0
-
Shotaro Ito
★ BarTender Hero ★
When you have any condition, you can cancel print with error message.
Ex:
1. Create Named Data souce "VAR1" which have value (database field etc)
2. Create a text with VB Script source (Event control script)
OnNewRecord (or OnPostPrompt) event
If Format.NamedSubStrings("VAR1").Value = "CAT" Then
Call Format.CancelPrinting("CAT prohibited","") ' No continue button - cancel only
'Format.CancelPrinting("CAT prohibited") ' With continue button
End If1 -
I will try this tomorrow and report back. Thanks.
0 -
This worked! Exactly as posted :-)
0
Please sign in to leave a comment.
Comments
3 comments