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
1865
Newbie: Printing DataGrids
posted

I have a UserControl with 4 DataGrids stacked one below the other within a StackPanel. All are same width but different heights and some have scrollbars. The grid widths are slightly wider than the printer page's landscape width.

I want to print all the 4 grids within the StackPanel, with all data in them and only the width of the grids rescaled to fit my page.

I tried adding the entire StackPanel as a section [report.Section.Add(MyStackPanel)] but this only prints 1 page, the un-scrolled data in the grids is not printed and also my last grid column gets truncated.

I tried setting HorizontalPaginationMode to Scale, but maintaing aspect ratio messes things up.

I tried adding individual grids as sections but then each grid is printed on separate pages.

 

Please help. Thanks.