# How to put a conditional page break for a report (fop.xml)

**URL:** <https://techcommunity.softwareag.com/t/how-to-put-a-conditional-page-break-for-a-report-fop-xml/204615>\
**Category:** Forum\
**Tags:** Adabas-Natural, Natural, NaturalONE, Natural-for-AJAX\
**Created:** [July 16, 2019, 8:29pm UTC](https://techcommunity.softwareag.com/t/how-to-put-a-conditional-page-break-for-a-report-fop-xml/204615 "2019-07-16T20:29:17Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jorge\_Canessa1](https://avatars.discourse-cdn.com/v4/letter/j/d78d45/32.png) [@Jorge\_Canessa1](https://techcommunity.softwareag.com/u/Jorge_Canessa1)\
**Post date:** [July 16, 2019, 8:29pm UTC](https://techcommunity.softwareag.com/t/how-to-put-a-conditional-page-break-for-a-report-fop-xml/204615/1 "2019-07-16T20:29:17Z")

</div>

Hi,

How do I put a conditional page break for a report (fop.xml) in  
my Natural for Ajax program?

Best regards,  
Jorge

---

<div class="post-metadata">

**Author:** ![Christine\_Zimmermann](https://avatars.discourse-cdn.com/v4/letter/c/839c29/32.png) [@Christine\_Zimmermann](https://techcommunity.softwareag.com/u/Christine_Zimmermann)\
**Post date:** [July 17, 2019, 7:59am UTC](https://techcommunity.softwareag.com/t/how-to-put-a-conditional-page-break-for-a-report-fop-xml/204615/2 "2019-07-17T07:59:26Z")

</div>

Hi Jorge,

You are using the _\_fop.xml layout with the cisfo:_ controls?  
What you always can do is: You can have different \*\_fop.xml pages for the same NATPAGE layout. The NATPAGE tag supports a property pdfpageprop.  
Do you want the pages to be identical besides the page break? What would be your condition for a page break?

Best Regards,  
Christine

---

<div class="post-metadata">

**Author:** ![Jorge\_Canessa1](https://avatars.discourse-cdn.com/v4/letter/j/d78d45/32.png) [@Jorge\_Canessa1](https://techcommunity.softwareag.com/u/Jorge_Canessa1)\
**Post date:** [July 17, 2019, 3:23pm UTC](https://techcommunity.softwareag.com/t/how-to-put-a-conditional-page-break-for-a-report-fop-xml/204615/3 "2019-07-17T15:23:49Z")

</div>

HI Christine,

Yes, I using the _\_fop.xml layout with the cisfo:_ controls.

My pages do not have a number of specific lines.  
They may be, for example, 12, 25, 30, 41 or other values ??depending on the  
amount of occurrences of a multiple field.  
My fop.xml has a grid where the report rows are placed depending  
of occurrences of the multiple field.

This would be like the NEWPAGE natural structured program.

Best regards,  
Jorge

---

<div class="post-metadata">

**Author:** ![Christine\_Zimmermann](https://avatars.discourse-cdn.com/v4/letter/c/839c29/32.png) [@Christine\_Zimmermann](https://techcommunity.softwareag.com/u/Christine_Zimmermann)\
**Post date:** [July 18, 2019, 7:37pm UTC](https://techcommunity.softwareag.com/t/how-to-put-a-conditional-page-break-for-a-report-fop-xml/204615/4 "2019-07-18T19:37:40Z")

</div>

Hi Jorge,

the cisfo:\* controls are a descriptive way to fill your pdf report with data bound to controls in the corresponding NATPAGE layout. It does not support real programming. If you have a grid in the NATPAGE layout then the corresponding cisfo:rowtablearea2 with ciyfo:repeat2 subtag makes sure that corresponding page breaks are done when required.  
If I understand you correctly, then you are searching for a more dynamic way to build a report from a more “generic” Natural data structure? The REPORT2 control - supported in NJX 9.1\_SP1\_FIX3 and higher - supports building reports dynamically from within your Natural program. In difference to the REPORT control the REPORT2 control does not require to have any grids in the NATPAGE layout. This might be another option?

For the cisfo\* way I currently don’t know a general solution for a conditional page break. But if you attach your \*fop and your corresponding NATPAGE layout I will recheck if I see a solution for this specific case.

Best Regards,  
Christine

---

<div class="post-metadata">

**Author:** ![Jorge\_Canessa1](https://avatars.discourse-cdn.com/v4/letter/j/d78d45/32.png) [@Jorge\_Canessa1](https://techcommunity.softwareag.com/u/Jorge_Canessa1)\
**Post date:** [July 19, 2019, 1:49pm UTC](https://techcommunity.softwareag.com/t/how-to-put-a-conditional-page-break-for-a-report-fop-xml/204615/5 "2019-07-19T13:49:31Z")

</div>

Hi Christine,

I solved the problem with the maximum page size in rows and number of rows placed in the page grid.  
The result of this difference I used to expand the array. This worked.

Thank you for the informations.

Best regards,  
Jorge

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/techcommunity/original/3X/c/d/cd19967bb605d28a72d77eb83a1cae22f3df2eb8.svg) [@system](https://techcommunity.softwareag.com/u/system)\
**Post date:** [April 2, 2021, 3:43pm UTC](https://techcommunity.softwareag.com/t/how-to-put-a-conditional-page-break-for-a-report-fop-xml/204615/6 "2021-04-02T15:43:08Z")

</div>


