how to set report viewer page setup at run time in visual studio 2005 RRS feed

  • Question

  • i want to set report viewer size. set page as A3 landscape at run time in visual studio 2005.

    i got some solution but it has version problem.


              Dim pg As New System.Drawing.Printing.PageSettings()
                    pg.Margins.Top = 0
                    pg.Margins.Bottom = 0
                    pg.Margins.Left = 0
                    pg.Margins.Right = 0
                    Dim Size As New System.Drawing.Printing.PaperSize
                    Size = New Printing.PaperSize()
                    Size.RawKind = 8
                    pg.PaperSize = Size

    problem occure at last line.

    • Edited by ishwar raut Monday, December 17, 2012 9:35 AM
    • Moved by Mark Liu-lxf Tuesday, December 18, 2012 6:59 AM (From:Visual Basic General)
    Monday, December 17, 2012 9:32 AM

All replies

  • Hi Ishwar,

    Thanks for you post.

    Microsoft provides a special forum to deal with report issue. For better support, I will move this thread to Visual Studio Report Controls forum. It will cost a little time to involve the members in this forum. I appreciate your patience.

    Sorry for any inconvenience and have a nice day.

    Mark Liu-lxf
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Tuesday, December 18, 2012 4:56 AM