Delete the blank page with repeating subforms | Community
Skip to main content
September 12, 2013
Solved

Delete the blank page with repeating subforms

  • September 12, 2013
  • 5 replies
  • 10574 views

hi all!

I have a form for declarations.

Every declaration has to be set on a new page.

I solved this with a repeating subform.

And in the properties of the repeating subform the variable 'After' has 'Go To Next Page'.

This works well with only one disadvantage. In the end an empty page is also be created.

I would like to get rid of this empty page.

But how can this be done?

kind regards,

Anton Pierhagen

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by dcidev

1) Select your repeating subform and add a Conditional Break (Object>Pagination>Edit...).

2) Enter this script: this.instanceManager.count>this.instanceIndex+1

3) Select Break: After and To: Top of Next Page

4) Select OK

Kyle

5 replies

dcidevAccepted solution
Level 9
September 12, 2013

1) Select your repeating subform and add a Conditional Break (Object>Pagination>Edit...).

2) Enter this script: this.instanceManager.count>this.instanceIndex+1

3) Select Break: After and To: Top of Next Page

4) Select OK

Kyle

September 13, 2022

Thank you so much! This was also for me the solution! 

September 13, 2013

Hi Kyle!

Thank you very much! This one does the trick. Thats a relief!

I am also very curious what does the Conditional break do?

I think:

this.instanceManager.count is the pagenumber where the repeating subform is printed on

this.instanceIndex = the index of the table which is used as binding for the subform

And did i understand it correctly that:

- The code is called after the subform is created.

- And when the condition is not correct the logic for the page is finished or only the logic of the (repeating) subform?

kind regards,

Anton

Level 9
September 13, 2013

Hey Anton,

Yes, this.instanceManager.count happens to be the page number only because there is only one instance of your repeatable subform on every page. this(your subform) instanceManager(the instance processing object) count(how many instances of your subform there are).

this.instanceManager.count>this.instanceIndex+1 is a condition that is evaluted every time the layout:ready event is thrown (which is almost all the time/whenever a layout change has occured). What it is saying is if this subform is not the last one goto Top of Next Page. If the condition is false then it just does whatever properties you defined in the Pagination tab.

Hope that helps.

Kyle

doomeyes
Level 2
May 6, 2018

I have the exact same problem except I have a table inside a subform that needs to repeat on every page.  I tried adding your Condition Break code as you wrote above, but it did not work. Do you have any other suggestions?  Thank you.

Here are my files:

Dropbox - repeating-table.pdf

Dropbox - repeating-table.xml

doomeyes
Level 2
May 7, 2018

I have finally figured it out.

The solution:

1) Make sure all Paginations are set to "Place: Following Previous" and "After: Continue Filling Parent."

2) Make sure all Subforms "Allow Page Breaks within Content" are checked.

There should be no data binding on the page, subform, or table.  And the "Repeat Subform" should be checked.

After I changed these, the blank page went away.

Here's the fixed PDF:

Dropbox - repeating-table-fixed.pdf