Normal Topic Visibility question (Read 822 times)
FlipGilbert
Full Member
***
Offline


Running Ver 2.6.4

Posts: 236
Location: Sandy Eggo
Joined: Mar 8th, 2005
Visibility question
Jul 28th, 2008 at 9:59pm
Print Post Print Post  
Hello All,
I'm looking to print a form, Its called "Packing Slip". It changes the forms header and removes the price fields. I am able to change the header back and forth just fine but when it comes to making the price fields invisible, print, and visible again it does not work. I'm sure the prices are made invisible then visible during the split second it takes to runs the code but when the "Print Page" pops up and you press the "Generate"  button it prints the form with the prices.
Am I able to do this with visibility?

My command button code looks like this..

var vRun as Int 
var vBanner1 as String
var vBanner2 as String
vBanner1 = @XLU(@fn, SFP, "CI!SFP", "Packing_Slip_Banner")
vBanner2 = @XLU(@fn, SFP, "CI!SFP", "WOBanner2")
Header1 = vBanner1
Header2 = vBanner2
Visibility(total,0)
Visibility(frieght,0)
Visibility(Shop_Labor,0)
If @Mode() = 1
     {
           vRun = @SelectTreeItem("Search Update Menu!Record Commands!Printing Commands!Print Form")
     }
Else If @Mode() = 0
     {
           vRun = @SelectTreeItem("Add Data Menu!Record Commands!Printing Commands!Print Form")
     }
vRun = ""
vBanner1 = ""
vBanner2 = ""
Visibility(total,1)
Visibility(frieght,1)
Visibility(Shop_Labor,1)

Thank you for any help!
Flip
  

It's not what a man says that matters or how he says it, but what he does and how he does it.
Back to top
 
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Visibility question
Reply #1 - Jul 28th, 2008 at 10:05pm
Print Post Print Post  
In Version 2, you don't use Visibility dynamically in programming for this. Check out the Visibility options for the elements in Designer. You can set the element to automatically be invisible when printed.
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
FlipGilbert
Full Member
***
Offline


Running Ver 2.6.4

Posts: 236
Location: Sandy Eggo
Joined: Mar 8th, 2005
Re: Visibility question
Reply #2 - Jul 31st, 2008 at 4:36pm
Print Post Print Post  
Thank you Erika,
Yes, I understand "and love the make visible or invisible when printed option" and I have read the Visibility command references for V2. I'm looking to make the Print visibility conditional to one LE.
Here is what I'm looking to achieve. . The single form starts as a "work order" or an "estimate", after the work is completed it becomes a "packing slip" removing the pricing for printing, The same form then becomes an invoice, with the pricing is printed and sent to the customers accounting dept. The controlling LE changes from work order or estimate to packing slip to invoice. The print button would be coded to If, then,else.
I was thinking a work around would be to make a print  button that removes the visibility to print "During the LE condition packing slip" and then another button to restore the visibility to normal for all other printing.

Hope that explains it better.
And thank you for your help.
Flip
  

It's not what a man says that matters or how he says it, but what he does and how he does it.
Back to top
 
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Visibility question
Reply #3 - Jul 31st, 2008 at 4:47pm
Print Post Print Post  
Ah, I see. Can you use the PrintAForm command instead of SelectTreeItem? I think that will allow the visibility setting to stick until you are done printing.
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
FlipGilbert
Full Member
***
Offline


Running Ver 2.6.4

Posts: 236
Location: Sandy Eggo
Joined: Mar 8th, 2005
Re: Visibility question
Reply #4 - Aug 1st, 2008 at 5:41pm
Print Post Print Post  
That works well! I get a outline of the command button that wont go away but all else works great!

Thank for your assistance yet again.
flip
  

It's not what a man says that matters or how he says it, but what he does and how he does it.
Back to top
 
IP Logged