Skip to main content

Search

Search

Print Or Hide Object Using Text File

Comments

3 comments

  • Avatar
    Shotaro Ito
    Hi Rrenix,

    Try OnProcessData script to modify input - when value is empty (""), the text won't be printed.
    Create a text, get datasource from database field "receipts_database.Inspect".
    In More options (Transform)> VB Script > OnProcessData event, place code like below:

    [code]If Value = "Yes" Then
    Value = "I"
    Else
    Value = ""
    End If
    [/code]
    0
  • Avatar
    Legacy Poster
    Shotaro-san, thank you very much for your help! That got me very close however I now a have another issue. When I press the Test button in Bartender to test run the script it shows correctly with an "I" but when I actually print labels to my printer it's physically printing a "Y". Do you know why that's happening? When the value = "No" nothing is being printed which is correct. I have attached the modified btw file.


    Thank You very much for you help!


    [quote name='Shotaro I -Seagull Support' timestamp='1335919227' post='2336']
    Hi Rrenix,

    Try OnProcessData script to modify input - when value is empty (""), the text won't be printed.
    Create a text, get datasource from database field "receipts_database.Inspect".
    In More options (Transform)> VB Script > OnProcessData event, place code like below:

    [code]If Value = "Yes" Then
    Value = "I"
    Else
    Value = ""
    End If
    [/code]
    [/quote]
    0
  • Avatar
    Shotaro Ito
    [quote name='rrenix' timestamp='1335968323' post='2345']
    When I press the Test button in Bartender to test run the script it shows correctly with an "I" but when I actually print labels to my printer it's physically printing a "Y". Do you know why that's happening? When the value = "No" nothing is being printed which is correct. I have attached the modified btw file.
    [/quote]
    Hi rrenix, it looks the script itself is correct.
    Would the problem only happens on printout and not in print preview?
    In such case, you might use printer font and that caused printer.
    Open the text, font tab, specify a Truetype / opentype font (Times New Roman, Arial etc), then uncheck [substitute best matching printer font] at the bottom of text tab.
    Font substitution can be disabled from uncheck [Warn when using TrueType fonts] in Print dialog > Performance tab - after that, BarTender no longer change your TrueType font to printer font.
    (To use printer font, select printer font like "Zebra Triumvirate" etc.)
    0

Please sign in to leave a comment.