I have a detail table that handles multi paged data. Issue is when I set the section borders (header/footer) to cut the detail table at a certain word/row (Carried Forward i.e. C/F), this works fine for multi page records. However some single page records need more space for the table. If I reduce the border then that breaks the break for the multi paged records.
What I would like to know is if there is a way to break a detail table onto another page if a cell/column contains a certain string.
Try the script and CSS below. Change the selector to match the table rows in the tbody section of your table. The script iterates over the rows and uses that index to retrieve the respective values from the detail table. In case a match is found it will add a CSS class to the respective row (this). The class sets the page-break-after property to always. This will force a page break after this row.
Add the respective CSS rule to one of the stylesheet files (for example context_print_styles.css)