none
Scrolling WinForms.ReportViewer RRS feed

  • Question

  • Hi!

    I have local report as a table that much bigger than display area of ReportViewer control.
    When I scroll horizontally (by mouse) to view last column and then move to next page the screen pops back to the beginning (I see first column again).
    How can I keep scroll position?
    I've tried to use AutoScrollPosition, AutoScrollOffset, HorizontalScroll.Value but none of this properties scrolls the report.
    What should I do to solve this problem.

    Thanks
    Thursday, September 13, 2007 5:03 PM

Answers

  • I have found that although ReportViewer is ScrollableControl it has WinRSViewer control that maintains report content.
    That is why to control report scrollbars you must use this child usercontrol.
    To complete task above follow several steps:
    1. Get reference to WinRSViewer.
    2. Handle PageNavigation event of ReportViewer to remeber AutoScrollPosition of WinRSViewer.
    3. Handle RenderingComplete event of ReportViewer to set AutoScrollPosition to member variable that has been set before (2).
    Also make sure you keep scroll position after page switching only.
    Monday, September 17, 2007 9:53 AM

All replies

  • I have found that although ReportViewer is ScrollableControl it has WinRSViewer control that maintains report content.
    That is why to control report scrollbars you must use this child usercontrol.
    To complete task above follow several steps:
    1. Get reference to WinRSViewer.
    2. Handle PageNavigation event of ReportViewer to remeber AutoScrollPosition of WinRSViewer.
    3. Handle RenderingComplete event of ReportViewer to set AutoScrollPosition to member variable that has been set before (2).
    Also make sure you keep scroll position after page switching only.
    Monday, September 17, 2007 9:53 AM
  • How to get reference to WinRSviewer, I could not find any thing in ReportViewer to get this?  I would appreciate your help.
    Wednesday, April 29, 2009 9:09 PM
  • Hi ManikR,

    Did you find a solution for this? I am having the same issue. Nothing online about the WinRSViewer!!

    Thanks.
    Sunday, May 24, 2009 6:08 PM