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
1945
Report preview initial position
posted

Hi

When i generate a preview for my datagrid the initial position is not on the top left. Somehow there's a margin?

InfraTestBase.zip
  • 14517
    Offline posted

    Hello,

    By default one page is displayed, centered in the preview. You can change the width of the page to fit in the viewer by adding the following to your code:

     

     

     

     

     

     

    this.XamReportPreview1.GeneratePreview(report, false, false);

     

     

     

    this.XamReportPreview1.ApplyTemplate();

     

     

     

    this.XamReportPreview1.DocumentViewer.FitToWidth();

    Valerie