Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
765
Understanding Page Breaks
posted

Hi

I have a report that contains several section grids (section.AddGrid) and several pages that contain images (section.AddPage page.AddImage)

after writting a grid I did section.AddPageBreak to make sure that the next item will start on a new page , I found the following problem

if the last item was a grid then the AddPageBreak added an extra empty page to the end of the document.

If after a grid I called section.AddPage for an image , then inbetween there was an empty page.

My understanding of AddPageBreak was to make sure that the NEXT item will start from a new page but seems that it add a new page always.

my workaround was to call AddPageBreak before I start a new grid and ONLY if the previous item was also a grid but this is not clean code.

is there something more elegant I can do . something that will tell the section to start a new page BUT ONLY if there is something new to add.

Thanks.

Parents Reply Children
No Data