Hi John,
I understand that you are facing issues while adding page breaks in report generator using MATLAB.
I have reproduced the issue at my end using MATLAB R2022b, I discovered that this issue only arises if the combined size of "lot1" and "lot2" exceeds the page size. If the combined size is smaller, the page break functions as expected.
To overcome this issue, I have identified a workaround that works in both cases. Instead of using the "mlreportgen.dom.PageBreakBefore" class, you can use the "mlreportgen.dom.PageBreak" class.
Refer to the below code for the implementation:
breakObj = mlreportgen.dom.PageBreak()
The documentation of the "mlreportgen.dom.PageBreak" class is available at the link provided below:
I hope this addresses your query.
Best Regards,
Yash