Hide 'serial Number' Title On Label S’abonner

0
Avatar
Legacy Poster

Hi All,

Not sure if it's doable:

 

Here's the scope: in our one of the shipping labels we have a 'Serial Number' preprinted. Now, we need to hide this title on Item condition(for international shipping). Let's say

 

***************************************************************

If Object("Item").value = "INT" then

 

hide this title( by drawing a filled frame around the title)

 

else

 

If Object("Item").value = 'yes'

***********************************************************

Is it doable? Any thoghts?

 

Appreciate your help!

[BarTender: Enterprise Auto...9.4 SR3]

6 commentaires

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

Yes you can do this via a label Format level VB script.

 

Select the "File>BarTender Format Options" menu item, select the "VB Scripting" tab, and enter in something like the following:

If Format.Objects("Text 1").Value = "Yes" Then
	Format.Objects("Box 1").PrintVisibility = True
Else
	Format.Objects("Box 1").PrintVisibility = False
End If

 

Note that in this example "Text 1" is the name of the text object whose value it is I wish to test, and "Box 1" is the name of the box object that I wish to conditionally print or not based on the value found.

 

See the below white paper for more information on this topic:

 

http://www.bartenderbarcodesoftware.com/label-software/whitepapers/Dynamically-Changing-Objects-At-Print-Time-Using-VB-Script.pdf

0
Avatar
Legacy Poster
Actions pour les commentaires Permalien

Thank you very much for reply!!

 

Unfortunately,  "Box1" is not an object( I wish, it is :(  ) it's already printed in the label. That's a pain.

 

SERIAL NUMBER :

 

I thought I could  to create VbScript function to draw a filled frame around this title on base of condional. Let's say something:

 

OnPrintJobStart event:

 

Dim myStr, ret


myStr = Objects ("Item"). value.....(Item="INT-WX350)
 

ret = Mid(myStr,1,3)

 

If ret = "INT" Then

Dim arectangle

Set arectangle = New Rectangle

arectangle.init 10, 20, 15, 15(coordinates of the title(SN)

arectangle.setWidth 30

arectangle.draw

End If

(function needs to be create as well)

 

Just my thoughts.....

Any input :) ?

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

We are talking about objects that you have created on your BarTender label document?

 

My example assumed that a box object was already created on the label and that it was named "Box 1".  It could be named whatever you like.  The point is that you can use the VB script to print or not print it based on the value of another object, or even a single data source.

 

Isn't that what you wanted?

0
Avatar
Legacy Poster
Actions pour les commentaires Permalien

Hello,

 

I'm trying to make an object printable or not, depending the value of a column in my database (Excel).

I've tried the following code OnPrintJobStart, but it doesn't work :

If Field("'#$'.CE")="N" Then
    Format.Objects("Texte 2").PrintVisibility = False
Else
    Format.Objects("Texte 2").PrintVisibility = True
End If 

 

Do you have any idea of what to do ?

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

Wouldn't the OnNewRecord event be more suitable.  By the way, is '#$' really the name of your worksheet?  Normally a field reference would look like this: Field("Sheet1$.FieldName")

0
Avatar
Legacy Poster
Actions pour les commentaires Permalien

Ok, I've tried OnNewRecord event, it works well !!

Thanks a lot !

 

My datasheet was called '#', I rename it.

Vous devez vous connecter pour laisser un commentaire.