Skip to main content

Search

Search

Don't Print Object Depending On Value Of Data Entry

Comments

5 comments

  • Avatar
    Shotaro Ito

    Hi,

    In Professional Edition, you need VB Script.

    In Automation Edition, you can do conditional print in Transform's surpress.

    Both example uses named data source. To name data source, enter name from small button next to name box in data source.

    Hope that helps.

    0
  • Avatar
    Legacy Poster

    Hi Shotaro,

     

    almost there I think.  I've managed to put the VB Script where it belongs and I've created the Named Data Source (TX1).

    When I open TX1 and change the value to "1000", the text field on my label disappears, when I put another value in it,

    it reappears. So that works great. 

     

    But I have no connection with the data entry object where you have to fill in this value.  You mentioned something about a small button but

    I don't know what you mean by that ?

     

    In attachment you can find my updated label.  Could you have another look at it ?

     

    Thanks !

     

    (by the way, I have the Professional Edition)

    0
  • Avatar
    Shotaro Ito

    Hi Mario,

    almost there - see attached pic.

     

    0
  • Avatar
    Legacy Poster

    Hi Shotaro,

     

     

    I found a new problem with this method.  When you apply the script to a normal text object, it works.  But when you apply the script on a text object that is connected to a database field, it doesn't work.

    It keeps the value of the database field.

     

    So I was thinking, if we can't change the value, perhaps we can change the visibility ?

     

    I tried this but it still doesn't work : If INSTR (TX1, "1000")>0 then visibility = "hidden"

     

    Any ideas how I can handle this ?

     

    thx !

    0
  • Avatar
    Shotaro Ito

    Hi Mario, PrintVisibility cannot be changed from VB Script in Professional edition - that's Automation edition's feature.

     

    Try this pattern:

    http://forums.seagullscientific.com/index.php?/topic/2856-hiding-2-objects-based-on-a-access-database-field/

     

    Or, consider upgrade to Automation too.

    0

Please sign in to leave a comment.