Printing Fields Management Follow

0
Avatar
Legacy Poster

Hi,

I want to be able to manage fields to print on a label.
Depending on the type of goods on the pallet(the condition), 1 or 2 barcodes will be printed on the label.
How can we handle this? Is VBScript necessary or is it possible to change the property of the barcode(something like "hidden")somewhere on the label model?

Thanks in advance for your help.

Olivier.

4 comments

0
Avatar
Legacy Poster
Comment actions Permalink

VBS seems to be the easiest way to do this.

You can use the line [i]Format.Objects("Barcode1").DoNotPrint = true[/i] to make the barcode hidden for certain conditions.

Otherwise, to access this property - double-click on the barcode, go to the General tab, and you'll see a checkbox that says "Do Not Print Object".

Does this help? If you provide some more specifics, we might be able to determine the best way to get what you want.
0
Avatar
Shotaro Ito
Moderator
Comment actions Permalink

Yes, from BarTender 9.3 Automation edition or above, you have VBScript tab in File > Label format option.
In OnNewRecord event (or other events), you can set script like nRyder described.

Another option is give empty string ("") or null to barcode datasource. if no data is given, barcode is not shown / printed.
So when you have database connection and Barcode1 uses [Field1] and Bacode2 uses [Field2],
at [Field1]="ABC" and [Field2]="", then only Barcode1 is shown.
0
Avatar
Legacy Poster
Comment actions Permalink

Thanks for your answer.

i would precize that I use the 7.50 version.

Can you indicate me where in the program I should determinate if the barcode is empty(so to not print) or not, ie where I have to write the OnNewRecord instruction?
0
Avatar
Legacy Poster
Comment actions Permalink

[quote name='olivier' timestamp='1326107520' post='1454']
Thanks for your answer.

i would precize that I use the 7.50 version.

Can you indicate me where in the program I should determinate if the barcode is empty(so to not print) or not, ie where I have to write the OnNewRecord instruction?
[/quote]

I'm unfamiliar with 7.5. Is there still Visual Basic Script as a data source option?

Judging from the above support post, you may be unable to script this in an event control script, but you could still do it from VB Scripting in the data source.

Let's say you have a sub-string pulled off the label (so it won't print. It's just for reference) that holds your data. Name it "Data". Have another field that is the condition of your goods, or whatever trigger you need to determine if a barcode will print or not. You can name that, for example, "goods".

In a created barcode on the label, set your data source to Visual Basic Script > Multi-Line Script, and make it something like the following:

[i]if (goods = "Fresh") then
Value = Data
else
Value = ""
end if[/i]

This above code will cause a Barcode to print with data in the "Data" sub-string, but only if your goods condition is listed as "Fresh". Otherwise, the barcode will populate with Null data and should not print at all. Modify the above code to match your needs, and replicate it in whatever barcode needs to change from printing to non-printing.

Please sign in to leave a comment.