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
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?