Hi,
I am trying to use the XamReportPreview with the XamDataGrid, and the grid is shown correctly in the preview.
But is it possible to enable the user to select the orientation of the report from the DocumentViewer?
Like an extra statebutton?
Best regards
Dennis Tycho Nielsen
Hello Dennis,
It has been a while since you have made your post, in case you still need support I will be glad to assist you further. I suppose the other community members can benefit from this answer as well. So I have been looking through your post and since the Report object has PageOrientation property, your best option is to generate the preview again, but the second time with PageOrienation set to Landscape. You can use the following code:
Report reportO = new Report(); EmbeddedVisualReportSection section = new EmbeddedVisualReportSection(xamDataGrid1); reportO.Sections.Add(section); reportO.ReportSettings.PageOrientation = PageOrientation.Landscape; XamReportPreview1.GeneratePreview(reportO, false, false);
Feel free to write me if you have further questions.