Zum Hauptinhalt gehen

Suche

Suche

Print Or Suppress Image Conditionally Part 2

Kommentare

5 Kommentare

  • Avatar
    Legacy Poster
    i sent you a PM, it's in dutch i hope you understand it. (because i saw afbeelding 1,2,3 :) )
    0
  • Avatar
    Legacy Poster
    There are probably a few ways to do this, but one would be to set yout picture object to be type: "Data Sourced Picture"

    You can then set the source to "Path", and set the default path of your graphics files (what folder on your computer they're in). Then, in the Data Source tab, choose "Visuaal Basic Script", Type: "Multi-Line Script", and you can use some type of code as follows:

    [code]Select Case Number
    Case 20
    value= "Afbeelding 1.tif"
    Case 30
    value= "Afbeedling 2.tif"
    Case 40
    value= "Afbeedling 3.tif"
    Case Else
    value= "Afbeedling 4.tif"
    End Select
    [/code]


    Setting the value in Case Else to "" may also work, I'm not sure. If not, just create an image called Afbeedling 4.tif and make it like 1 pixel x 1 pixel no color, and it will be the same as not printing at all.
    0
  • Avatar
    Legacy Poster
    Will the code recognize characters instead of integers. To clarify instead of Case 30 can it be Case "gloves". Where the term gloves is coming from a view in Oracle and the associated icon is located in a separate file. I have potentially 15 different icons I can use but typically only 5 or so are actually included on the label. They represent our PPE requirements.


    [quote name='nRyder' timestamp='1314965905' post='500']
    There are probably a few ways to do this, but one would be to set yout picture object to be type: "Data Sourced Picture"

    You can then set the source to "Path", and set the default path of your graphics files (what folder on your computer they're in). Then, in the Data Source tab, choose "Visuaal Basic Script", Type: "Multi-Line Script", and you can use some type of code as follows:

    [code]Select Case Number
    Case 20
    value= "Afbeelding 1.tif"
    Case 30
    value= "Afbeedling 2.tif"
    Case 40
    value= "Afbeedling 3.tif"
    Case Else
    value= "Afbeedling 4.tif"
    End Select
    [/code]


    Setting the value in Case Else to "" may also work, I'm not sure. If not, just create an image called Afbeedling 4.tif and make it like 1 pixel x 1 pixel no color, and it will be the same as not printing at all.
    [/quote]
    0
  • Avatar
    Michael Toupin (mtoupin
    [quote name='Jcush80' timestamp='1350920132' post='3551']
    Will the code recognize characters instead of integers. To clarify instead of Case 30 can it be Case "gloves". Where the term gloves is coming from a view in Oracle and the associated icon is located in a separate file. I have potentially 15 different icons I can use but typically only 5 or so are actually included on the label. They represent our PPE requirements.
    [/quote]

    Certainly. You would just have to enclose it in quotes:

    Case "Gloves"
    value = 1
    case "Hat"
    value = 2

    etc etc
    0
  • Avatar
    Legacy Poster
    Actually what I ended up doing in Bartender 10.0 was using extternal picture file and selecting get file name from database field. This allowed me to use the name coming out of the database and setting the file path to where the icons are stored. The potential problem I have there is I have room for all 15 potential icons and I'm not sure how to deal with limiting them to only the ones that are called for in the database. Each potential icon I believe will have it's own column in the completed database which is why I opted to go with the "external picture file" as the picture source. The programmer that is creating my view is out this week so I'm not sure how the final view will look.



    [quote name='Mike T - Seagull Support' timestamp='1350928988' post='3555']
    Certainly. You would just have to enclose it in quotes:

    Case "Gloves"
    value = 1
    case "Hat"
    value = 2

    etc etc
    [/quote]
    0

Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.