Don't Print Object Depending On Value Of Data Entry S’abonner

0
Avatar
Legacy Poster

Hi, I'm trying to make an object invisible, depending on the value of the data entry that you have to do just before printing.

 

The data entry field is called "Besturing tekst invoervak 2" (sorry, Dutch version of Bartender) and the object that I want to make invisible

is "Tekst 12" and "Tekst 10".  They should be made invisible when the data entry contains "1000".

 

I've added my label to this post.  I've seen you can put VB Script in the Document Properties but also in the properties of the object itself (on the tab "Transforms").  

 

Could someone help me with this ? In babysteps if possible because I've only just purchased Bartender and know nothing about VBscript

 

Thanks !

 

 

 

 

 

5 commentaires

0
Avatar
Shotaro Ito
Actions pour les commentaires Permalien

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
Actions pour les commentaires Permalien

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
Actions pour les commentaires Permalien

Hi Mario,

almost there - see attached pic.

 

0
Avatar
Legacy Poster
Actions pour les commentaires Permalien

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
Actions pour les commentaires Permalien

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.

Vous devez vous connecter pour laisser un commentaire.