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
975
Problem generating report preview
posted

I've encountered a very strange problem with the xamReportPreview and the GeneratePreview function. I have a xamDataGrid with approx 500 rows. I create a Report object for the grid, via an EmbeddedVisualReportSection object, and pass this object into the GeneratePreview() method of the xamReportPreview control.

For some reason, it only generates a preview for the first page, with the second page being blank and tiny (I've attached a screenshot below). I can't work out why this is happening. It's all the more strange, because I have another app that uses a datagrid, and the reportpreview controls, and generates a print preview in exactly the same way as this app, and yet that one works perfectly every time. I've checked that the code to generate the preview is the same by stepping through each one side by side, and there are no differences.

Can anyone shed any light on why this would be happening - I'm completely stumped!

Cheers,

Rob

Parents
No Data
Reply
  • 975
    posted

    OK, I found, bizarrely, that the problem occurs if the xamReportPreview control is hosted in a wpf window. If I host the control in a wpf UserControl, and then host the UserControl inside a window, it seems to work fine.

    Is this an issue that anyone else has come across?

Children
No Data