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
625
Enable the end user to select orientation from DocumentViewer
posted

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 

 

  • 138253
    Offline posted

    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.