Here is what I am trying to do:
I have a subform with objects ( multiple 3 column tables, each with a checkbox followed by two text fields ) that I want to be on screen, but only print when said checkbox is "checked"
Here is what I have tried:
The subform is set to flowed so that the objects will group together on the printed form, there are approximately 35 of these mini-tables
I have tried to set the presence of each "table" to visible (screen) in the object palette and then set a change javascript in the checkbox to "object".presence = "visible" ;
this method makes the tables always visible on screen, but they do not print out even when checked.
I have tried to wrap each table in a subform and use the above method with the same results
I have tried to set each tables object palette presence to visible and use a script for initialize : "object".relevant = "-print" ; and the checkbox in each table set to change "object".presence = "visibe" ;
Same results as above, nothing prints
I have tried to set object relevance to "+print" and then after checking the checkbox in each table, the table disappears. HOWEVER it then prints. This is the closest I've come to what I want to do, but I need the table to stay after it is checked.
So. What's the key to this one?
Solved! Go to Solution.
Views
Replies
Total Likes
It says the doc cannot be found or I do not have access to it.
Can you email it to LiveCyle8@gmail.com instead?
Paul
Views
Replies
Total Likes
It looks like you have used most of the properties that are needed to achieve it.. If you can post the form to LiveCycle9@gmail.com I can see what may be missing..
Please mention where the issue is in the form..
Thanks
Srini
Views
Replies
Total Likes
Sent.
Thank you for taking the time to help me.
Views
Replies
Total Likes
Here is the corrected form..
https://acrobat.com/#d=ewLmri7On6YjYP7HDuvdiA
I have placed the scripting for two different ways to achieve it.. Check the prePrint and postPrint event scripts on the Print button. You can use which ever suits to your requirement.
Another observation..
Instead of having 3 subforms and inside a table with 3 columns each.. Why can't you add a single table with 9 columns. Adding too many subforms and tables will impact the performance of the form and maintenance also will be difficult.
Thanks
Srini
the subforms were only added during troubleshooting while trying to get the scripts to work. 1 table with 9 columns wouldn't group correctly.
the subforms will be unwrapped. But I am still unclear as to which of the scripts constitutes method 1 and method 2 and the function of either. I have to know as I will be needing to make things visible/hidden on print command later in the form, and probably other forms in the future.
Also, using this method, the tables do not hide themselves on print command. They merely go invisible (take up the space still, just can't see them). That defeats the whole purpose of going through the trouble of hiding unecessary tables from the print job as it uses the same amount of space, and looks awkward.
I want the "checked" tables to remain visible AND pull together, eliminating both unneeded text and wasted (dead) space. With the subform set to flowed this should be happening. As it is, with all 35+ tables, the couple that are selected to remain visible will be all over the page..
Views
Replies
Total Likes
Perhaps I'm overcomplicating this.
I guess what I really need to know is, how do I toggle an object from visible to visible (screen only) based on a user selection?
Views
Replies
Total Likes
If you want to toggle between, the Visible (Screen Only) and Visible (Print Only)..
Views
Replies
Total Likes
Here is an update:
I have realized that to accomplish what I want, all I would really need to do is leave all objects as visible (in object palette) but then toggle their visiblity in the preprint event on the print button.
I have written the following script to accomplish this:
Javascript code under the preprint event of the print button
if (form1.LabRequest.Diagnosis.T1.R1.C1.rawValue == 0 ){
form1.LabRequest.Diagnosis.T1.presence = "hidden"
endif ;
This seems to work perfectly for the first object (of which there are 33). However it doesn't work for any of the subsequent objects, using the same script as above with the same event, the only different being the name of the object.
The object will remain on screen whether the tables checkbox is selected or not. At print, if the object is NOT selected, the object will disappear and all remaining objects move to the next open space. However, as I said, it is currenlty ONLY functioning with the first object.
Is there perhaps something I need to place in between each set of the above code to make it work for all 33 objects in my subform?
Views
Replies
Total Likes
It is hard to tell why th eother objects do not work without seeing the code. Do you get any errors in the java console?
You might find it easier to change the presence of the entire table (if that is what you are trying to accomplish). Child objects of a parent container will inherit the settings from the parent so if all 33 objects are under a common container a single statement will do the trick.
Paul
Views
Replies
Total Likes
Srini,
BTW I wanted to thank you for pointing me in the direction of preprint and postprint events. It was an option I had never used before, and seems to be where the answer to this problem lay.
Paul,
Thank you for assisting. Javascript console reveals no errors in the code. In my code, T1 represents the entire table, where C1 represents the checkbox within the table. When the value of C1 is 1, it should (and does) make T1 (table 1) remain visible, whereas value 0 renders T1 (table 1) hidden (at the preprint event, as intended)
So am I not changing the presence of the entire table by doing this?
I can send you copy of the partially functioning form if you wish to view it.
Again, any help you all provide is very much appreciated.
Views
Replies
Total Likes
https://acrobat.com/#d=2JP-FjYRgdkF8z5ee08pWw Here is a link to the form posted on Adobe acrobat.com
Views
Replies
Total Likes
Something happened to your upload ...I cannot access the file.
Paul
Views
Replies
Total Likes
There must have been an error in the upload.
Please try again using the new link.
https://acrobat.com/#d=2JP-FjYRgdkF8z5ee08pWw
Thank you.
Brandon
Views
Replies
Total Likes
It says the doc cannot be found or I do not have access to it.
Can you email it to LiveCyle8@gmail.com instead?
Paul
Views
Replies
Total Likes
Paul,
Sent, thanks again.
Brandon
Views
Replies
Total Likes
Paul, thank you so much.
For anyone that may not know (script newbies like myself):
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies