none
Programatically Get & Set the Page Margin, Paper Size, etc... from RDLC ReportViewer Pagesetup dialog RRS feed

  • Question

  • Dear Friends

    I am facing a serious problem while Set & Get the Page Margin, Paper Size, Orientation etc to & from the RDLC - Report Viewer Page setup dialog.

    I want to do this in Programatically.

    Note :

    1. Programatically I can able to get the default values of Page Margins from the Pagesetup.

    2. Once I change the values in the  Pagesetup, I cannot able to retrieve the modified Pagesetup values, it fetches only the default values of the Pagesetup.

    ex., 

    Following code gets the default value

    MarginTop = ReportViewer1.LocalReport.GetDefaultPageSettings.Margins.Top
    MarginLeft = ReportViewer1.LocalReport.GetDefaultPageSettings.Margins.Left
    MarginRight = ReportViewer1.LocalReport.GetDefaultPageSettings.Margins.Right
    MarginBottom = ReportViewer1.LocalReport.GetDefaultPageSettings.Margins.Bottom

    Kindly help me to Get & Set the Pagesetup values Dynamically.


    Thanks

    Thiraviam

    Friday, October 17, 2008 8:45 AM

Answers

  • Thiraviam Jebatheesh said:

    Dear Friends

    I am facing a serious problem while Set & Get the Page Margin, Paper Size, Orientation etc to & from the RDLC - Report Viewer Page setup dialog.

    I want to do this in Programatically.

    Note :

    1. Programatically I can able to get the default values of Page Margins from the Pagesetup.

    2. Once I change the values in the  Pagesetup, I cannot able to retrieve the modified Pagesetup values, it fetches only the default values of the Pagesetup.

    ex., 

    Following code gets the default value

    MarginTop = ReportViewer1.LocalReport.GetDefaultPageSettings.Margins.Top
    MarginLeft = ReportViewer1.LocalReport.GetDefaultPageSettings.Margins.Left
    MarginRight = ReportViewer1.LocalReport.GetDefaultPageSettings.Margins.Right
    MarginBottom = ReportViewer1.LocalReport.GetDefaultPageSettings.Margins.Bottom

    Kindly help me to Get & Set the Pagesetup values Dynamically.


    Thanks

    Thiraviam



    Sunday, October 19, 2008 2:32 PM

All replies

  • Thiraviam Jebatheesh said:

    Dear Friends

    I am facing a serious problem while Set & Get the Page Margin, Paper Size, Orientation etc to & from the RDLC - Report Viewer Page setup dialog.

    I want to do this in Programatically.

    Note :

    1. Programatically I can able to get the default values of Page Margins from the Pagesetup.

    2. Once I change the values in the  Pagesetup, I cannot able to retrieve the modified Pagesetup values, it fetches only the default values of the Pagesetup.

    ex., 

    Following code gets the default value

    MarginTop = ReportViewer1.LocalReport.GetDefaultPageSettings.Margins.Top
    MarginLeft = ReportViewer1.LocalReport.GetDefaultPageSettings.Margins.Left
    MarginRight = ReportViewer1.LocalReport.GetDefaultPageSettings.Margins.Right
    MarginBottom = ReportViewer1.LocalReport.GetDefaultPageSettings.Margins.Bottom

    Kindly help me to Get & Set the Pagesetup values Dynamically.


    Thanks

    Thiraviam



    Sunday, October 19, 2008 2:32 PM
  • Unfortunately, this feature is not available in the current report viewer. We are looking at adding this feature to the next release.
    Nick Allen, Microsoft SQL Server Reporting Services. This posting is provided "AS IS" with no warranties and confers no rights.
    Monday, October 20, 2008 1:47 AM
  • Is this features implemented in Report Viewer 2010?  I have a scenario where i dont want ZERO margin on page 1 but have fixed margins for all other pages.

    Any idea if this is something we can do dynamically in .cs file.

    Thursday, September 13, 2012 7:41 PM