Print Preview Follow

0
Avatar
Legacy Poster

I've attached a file I'm having issues with. There is a script in OnSerialize that should be controlling the visibility of barcodes - but it fails miserably when I look at the results in the print preview.

However, if I print it, it usually seems fine. UNLESS I try to print multiple labels on one page of a PDF creation driver. Then it fails again and doesn't seem to create the red codes.

[attachment=204:OnSerialize.btw]

5 comments

0
Avatar
Gene Henson
Moderator
Comment actions Permalink

Instead of using the DoNotPrint property, try using PrintVisibility instead.

Here are the comments on each property:

[quote]
Format.Objects(<object name or index>).DoNotPrint

Sets or returns the 'do not print' flag. Setting to True means to hide the object from printing for the entire print job. Do not use this property if you want to hide objects for individual printed items. See the PrintVisibility property instead.
[/quote]
[quote]
Format.Objects(<object name or index>).PrintVisibility

Sets or returns whether or not to print the object on an item during a print job. PrintVisibility is always set to True at the beginning of a print job. Set to False to not print the object on any item during printing.
[/quote]

Does that help?
0
Avatar
Legacy Poster
Comment actions Permalink

Oh. I've been using DoNotPrint for a variety of applications where I want to suppress the printing of data based on other data. I will look into changing over to PrintVisibility and give it a try.
0
Avatar
Legacy Poster
Comment actions Permalink

I am having a similar problem. I have several txt fields that are conditional. I turn them off/on by using below code.
Print preview is working correctly. It's when sent to printer that there is no changes to label. Using BT 10 Automation.

Script is is in Doc Options.


'Executes during printing, after reading a database record.



IF InStr(Field("IV00101.USCATVLS_4") , "1022") <> 0 THEN
Format.Objects("txt1022_Not").PrintVisibility= True
Format.Objects("txt1022_Osh").PrintVisibility= True
Format.Objects("txt1022_Pos").PrintVisibility= True
Format.Objects("txt1022_War").PrintVisibility= True
Format.Objects("pic1022_Guy").PrintVisibility= True

Format.Objects("lin113_Dot").PrintVisibility= False
Format.Objects("txt113_Len").PrintVisibility= False
Format.Objects("fld113_Len").PrintVisibility= False
Format.Objects("txt113_War").PrintVisibility= False
ELSE
Format.Objects("lin113_Dot").PrintVisibility= True
Format.Objects("txt113_Len").PrintVisibility= True
Format.Objects("fld113_Len").PrintVisibility= True
Format.Objects("txt113_War").PrintVisibility= True
Format.Objects("txt1022_Not").PrintVisibility= False
Format.Objects("txt1022_Osh").PrintVisibility= False
Format.Objects("txt1022_Pos").PrintVisibility= False
Format.Objects("txt1022_War").PrintVisibility= False
Format.Objects("pic1022_Guy").PrintVisibility= False
End If
0
Avatar
Gene Henson
Moderator
Comment actions Permalink

If the print preview looks correct, I would be curious to see what the actual print code looks like. It could be that the printer is erroneously printing fields that should be suppressed throughout the the job.

You can get a copy of the print code that is generated by clicking the "Print to File" check box on the Print Screen in BarTender (below Printer Properties).

[list=1]
[*]Can you generate print code and attach it to this thread?
[*]What type of printer are you using?
[*]What version printer driver do you have installed?
[/list]
0
Avatar
Legacy Poster
Comment actions Permalink

I was able to solve other problem by using another template in same file with BT 10.

I'm working in another label were I want a certain text box on/off. It's doing the same thing as before, preview is good and output no change.

I tried to upload files but getting error that I'm not permitted.

Using Zebra ZM 400, driver Seagull Zebra ZPL-II ver 7.3

Edit: Put text in VBSCRIPT to make it work.

Please sign in to leave a comment.