I have an application built with razor pages that creates reports in excel. The data it prints is in groups four rows high. Each group has a "header" bar of sorts and four rows of data beneath. Is there any way to ensure that the last group on the page doesn't get split up like in the below photo?
Turns out everyone who worked on this prior to me thought that there would be some method that could handle this. Not so. After determining that each group was always the same height, I calculated how many would fit on one page and then put a loop around the printout that would insert a page break after each 6th or 7th(can't remember) group was printed, so all of them fit on the page together.