cancel
Showing results for 
Search instead for 
Did you mean: 

Changing print order of subforms at runtime

Former Member
0 Kudos

Hi All, Is it possible to control the print order of subforms at runtime? For example, I have subforms 1,2,3 and 4 of type flowed in my layout in a single body page, which are placed one after the other in the same numeric order. Now, when printing the form, by default the order in which the subforms would be printed is 1,2,3 and 4. But, is it possible to change the order during runtime so that they would be printed in 3,4,1 and 2 by checking some values passed using a variable?

Accepted Solutions (1)

Accepted Solutions (1)

OttoGold
Active Contributor
0 Kudos

Maybe you can reduce the number of posssible combinations wrapping some subforms into a new parent?

Why exactly do you need this? I have done a little search on this topic and have not found a word. That means the people who wanted to make this happen has changed their mind before the development struggle. Maybe you can change the scenario so you will not have not have to implement something that (maybe) cannot be done?

Otto

Former Member
0 Kudos

Yes Otto, I think it is not possible in PDF forms. I too searched the internet and SDN but could not find any solution. I think I can only suggest a change in scenario. Thank you for your time.

Answers (3)

Answers (3)

OttoGold
Active Contributor
0 Kudos

If you check the JS scripting guide:

http://www.adobe.com/devnet/livecycle/articles/lc_designer_scripting_basics/lc_designer_scripting_ba...

they write (on page 32, bottom) you can use it "For example, you can use this event to customize the ordering or placement of subforms on your form before the form is paginated and rendered." But they don´t say how. Maybe you can contact some guy from Adobe or ask on Adobe.com forums.

Also there is page 112 where it is said:

Scripting to force the first and second subforms to switch locations on the form

The following script forces the first and second Subform2 instances to switch locations on the form.

methods.Subform2.instanceManager.moveInstance(0,1);

You can also write this script by using the underscore (_) notation to reference the properties and methods

of the instance manager, as shown here.

methods._Subform2.moveInstance(0,1);

Maybe that could help you,

regards Otto

OttoGold
Active Contributor
0 Kudos

Well... I have found this one: http://forms.stefcameron.com/2006/05/page/2/

Maybe (only maybe!!) you can try this approach: based on your "customizing" copy the subform (to the desired position) and delete the original one. Through some crazy sequence of copying and deleting you can achieve the order you want. Otto

p.s.: well, this IS crazy...

OttoGold
Active Contributor
0 Kudos

Hello, I am not sure, if you can change the order at runtime, I have never done that.

But there is a simple workaround. You can create the proper order like 1, 2, 3, 4 and make that visible and create a variant 3, 1, 4, 2 or something, make that hidden. Next test the value like


if (this.checkvalue.rawValue == null) { this.hiddensub.presence = "visible"; this.original.presence = "hidden"; }

That is very straighforward and fast (just copy parent subform, rearange, change presence, add script).

Hope this solves your problem, Otto

Former Member
0 Kudos

Thank you for replying, but in this case I have 23 subforms. Now, the order will be defined by the user in the print program. So, using your workaround, I might have to create all possible combinations for the set of 23 subforms, which I think is not a good idea.