Change Number Of Copies For Each Record With Logic Expression? S’abonner

0
Avatar
Legacy Poster

In printing labels I have a field that indicates the number of copies per each label, except if the number is over 100 - at which time I want to print 10 labels for that record.

How can I accomplish this?
Thanks,
David Avery

3 commentaires

0
Avatar
Ian Cummings
Modérateur
Actions pour les commentaires Permalien

Data source the copies print quantity.  For the data source type choose a VB script - event controlled script.  In the OnNewRecord event write a conditional statement that tests the value of the database field to see if it is a value greater than 100, if true then set the value of the data source to be 10, else set the value of the data source to be the value of the field for that record.

 

Example:

 

If Field("MyTable.PrintQuantity",1) > 100 Then

    value = 10

Else

    value = Field("MyTable.PrintQuantity",1)

End If

 

*Note the use of "1" for the second parameter in the field function simply sets the default value of the field at design time to 1 in order to avoid annoying errors appearing when not actively connected to the DB.

0
Avatar
Legacy Poster
Actions pour les commentaires Permalien

How to add named substring in bartender document

0
Avatar
Ian Cummings
Modérateur
Actions pour les commentaires Permalien

In newer versions of BarTender these are your data sources for each object.  With a data source selected you can then give it a unique name for sharing/reference purposes.  We used to call data sources, "sub-strings".

Vous devez vous connecter pour laisser un commentaire.