Conditional Printing
I am trying to figure out how to print with conditional statement. If datasource (type database field) equals "OTC" then print OTC, else print nothing. I have tried using the Character Filter, custom allowable characters "OTC" worked fine but when value is "COS" it printed "CO".
-
When using BarTender v10.1 or later you can set conditional printing for design objects, layers, and templates via the top level properties for the item in question. For design objects you'd select the "Print when" properties item and set the condition for when the object is to print. You could also use the VB Script capability in this respect to set the data source of the object within an If...Then statement. Note that setting an object's data source to nothing has the effect of the object not printing.
0 -
so database field, has VB Script:
IIF Format.ViewRecordNavigator.CurrentRecord = "OTC","OTC",""
but
when COS is value it still prints?
i would only like to print OTC if value is OTC, all other values blank
0 -
Wouldn't you need to use an event based VB script and use the OnNewRecord event for your expression? And wouldn't the expression need to reference the field value you wish to test?
IIF Field("TableName.FieldName") = "OTC","OTC",""
0
Please sign in to leave a comment.
Comments
3 comments