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

Hi,

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

Best regards,
Jorge

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

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

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

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