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
105
How to prevent blank last page from printing?
posted

Hello.

I'm using the WPF Reporting functionality to print a XamDataGrid and sometimes the printed output contains a blank last page.  I'm not really sure why a blank last page is being printed (nothing in the visual representation of the grid indicates that a blank page should be printed), but I'm willing to live with that if there is some event that can be handled that will let me examine the output that's about to be printed and then decide if I want to allow the printing to happen.  That way I could just prevent the blank last page from being sent to the printer.  Does the WPF Reporting framework expose such an event?

 

Thanks

 

Parents
No Data
Reply
  • 54937
    Offline posted

    The only reason I could think that the last page could be blank is if you have a hierarchical grid where multiple pages are used to render a single set of rows.

    e.g. Consider a structure such as the following:

    ParentCell1       |     ParentCell2      |     ParentCell3      |     ParentCell4      |

       ChildCell1          |     ChildCell2      |

    Where when printed the cells of the parent row extent onto multiple pages horizontally and therefore the horizontal extent of the grid being printed is wide but the cells of the child record do not extent to multiple pages (or at least not to the last page that the parent row would). When the last row(s) being printed are that of the child records then nothing would be on the last page since none of its cells extent to that page.

    If that is not the scenario that you are describing then I would recommend submitting a sample to the support group so the issue can be investigated.

Children