We have a process that generate a dynamic report for a customer. It is dynamic because every customer has different information that is printed on the same report. For that we manually build the syntax for the dw and then create it and print it.
What we create is a dw with a fixed header, a fixed footer ad only one detail row with all the information on it (see the attached example).
The user can choose to print in Letter or A4 paper size so we change some of the properties according to that.
The problem comes when we preview it or print it. As we only have one row we need to simulate page breaks in order that we have no overlapping objects when PB generates the report. The idea is to find the max size that we can use to position objects on the different pages and move to the next one if the object does not fit in the current page. For that, we need to find that correct size, I tested with hundreds of sizes no one works. And I discover why.
For example, if I set the units for the dw in pixels I saw that the first jump is at 861 units, the second should be at 861* 2 = 1722, the third at 861*3=2583 and so on.
In the attached dw I put a red line on each imaginary page break and I can check that all the objects are correctly positioned in a way that no one overlaps those lines. Thus, the process that positions the objects verifying the positions works fine.
But, when I preview the object or send it to print, the errors appear and the objects starts to overlaps the page breaks generated by PB. And that breaks, does not corresponds to the ones for the red lines. On every page the space between the corresponding red line and the break generated by PB increased. That causes the objects to overlap the jumps.
I would like to understand the behavior. With that issue there is no way to set a manual page break. How PB establishes the jumps between pages? How can I manage to put extra spaces in order to simulate a page break?
I tried using the different units for the dw (pixels, PBUnits, inches and cms) and in all the cases the result is the same.
Thank you very much for your help.