Set Print Visibilty From Database Field S’abonner

0
Avatar
Legacy Poster

I found a couple topics about this, but I can't seem to make it work...

I am using Bartender 10.0 SR4

 

I am using a linked excel table to fill in some of my data sources.

 

One field is 'number of boxes' and is just a number (1-5) or blank, although it could be 0 if needed. This is a named data source in my bartender document (boxes).

 

I have a text object named 'Required Boxes' that uses a prefix-'number of boxes'-suffix. so it would print like "Complete Kit Requires 2 Boxes"

 

I have tried to set up a vb script to prevent 'Required Boxes' from printing, including the prefix and suffix, if 'number of boxes' is empty.

 

I navigated to File> BarTender Document Options> VB Scripting> Functions and Subs

 

This is the script I used:

 

If Format.NamedSubStrings("boxes").Value = "" Then
Format.Objects("Required Boxes").PrintVisibility = False
End If

 

I know absolutely nothing about scripting, so this is all new to me.

 

 

4 commentaires

0
Avatar
Legacy Poster
Actions pour les commentaires Permalien

I dont think you need to use the VB to achieve what you want. 

 

If the Number of Boxes value is "" then it wont print anyway so all you need to be able to stop printing is the Prefix and Suffix elements.

 

For this if you remove the Prefix information and instead add a new embedded data sub-string to the filed and place if before the number of boxes string with the field data being "Complete Kit Requires " (inc the space at the end) and then on the Transforms tab adjust the suppression setting to if the Next string is empty then that should sort the prefix. For the suffix add another embedded data sub-string to the field ("<SPACE> Boxes"), this time after the number of boxes and this time with suppression set to if the Previous string if empty.

 

I think this should sort it for you, although the number of boxes element must be empty and not contain a <SPACE> or a 0 instead.  

 

Sample attached of the fields,

0
Avatar
Legacy Poster
Actions pour les commentaires Permalien

Thanks, that worked. I had no idea you could do that!

I am new to this. I had the labels thrown on me when the previous guy that did it left.

I am trying to get rid of the 500 individual files we print from and use a database with 3 templates instead. Took  me a couple days of reading and trial to get the database and templates  switching correct.

making this line disappear when not needed saves me from having to add more templates. I try to keep it simple!

I would still like to learn the VB code because my next project is an assess database (something else know nothing about) to organize a bunch of product testing and quality data.

Thanks Again

0
Avatar
Legacy Poster
Actions pour les commentaires Permalien

The only VB I know is from trying to work out how to do things inside BarTender labels and a little bit of Macro stuff.

 

The software is very good for rationalising label designs when you link them to databases making it far easier in the future if you ever need to change the label size or amend them due to new regulations etc. 

 

One useful tip when printing labels linked to a database is if the operator is using a query to select the item and the numbers they have to type in are very similar, is if you make a unique field (like the description) prompted (from the Transforms tab - or Data Entry Control I think it was in v10.0) and make that field read only, When they print the label that field will then appear on the Prompt screen and they can use it as a double check before they go off and print a bunch of the wrong label as they typed a 1 instead of a 2 at the end of a product code entry for example.

0
Avatar
Legacy Poster
Actions pour les commentaires Permalien

Thanks,

I actually figured that part out, I have it display weight and UPC because they are supposed to double check that before printing. Now if i could only lnk it to SAP so they just type in WO number, or it shows the level 1 components on the BOM....getting way ahead of myself

Vous devez vous connecter pour laisser un commentaire.