none
ReportViewer scrolls to the top of the page after Matrix row drilldown click RRS feed

  • Question

  • Hello

    I'm using VS2005 / VS2008 and MSSQL RS 2005 + ReportViewer v.8 or v.9.

    Problem: when user makes drillthrough click on "plus sign" on Matrix row postback occurs. Then scroll position is lost! It scrolls to the top of the page. It's very bad for report users.

    The most interesting thing is that it happens only within ReportViewer! I works acceptable if I open report via "localhost/ReportServer/Pages/ReportViewer.aspx?..." . It's based on something similar to ReportViewer :

    <%@ Register TagPrefix="RS" Namespace="Microsoft.ReportingServices.WebServer" Assembly="ReportingServicesWebServer" %>


    <RS:ReportViewerHost ID="ReportViewerControl" runat="server" />


     And it remains scroll position well!

    Is there a way to make ReportViewer working correcly? (remembering scroll position on Matrix row drillthrough postback)

    I read that Report Viewer 10 (of VS 2010) will lack this issue but it doesn't support MSSQL 2005 which I plan to use so far.

    Thank you for any help and workaround in advance!

    Andriy

    Sunday, February 28, 2010 6:43 PM

All replies

  • How are you sizing the report viewer?  Are you changing the default values of AsyncRendering or SizeToReportContent?
    Sunday, February 28, 2010 6:54 PM
    Moderator
  • Hi Brian,

    I'm using ASP.NET Master Pages so Report Viewer is placed into "asp:Content" page.

    Here is "child page" markup:

    <%@ Page Language="C#" MasterPageFile="~/WebSiteReport.Master" AutoEventWireup="true" CodeBehind="CompetitorPrice.aspx.cs" Inherits="CompetitorPrice" Title="Untitled Page" %>

    <%

    @ Register Assembly="Microsoft.ReportViewer.WebForms, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"

     

    Namespace="Microsoft.Reporting.WebForms" TagPrefix="rsweb" %>

    <

    asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">

     

    <rsweb:ReportViewer ID="rpvMain" runat="server" Font-Names="Verdana" Font-Size="8pt" HyperlinkTarget="_blank"

     

    Height="100%" ProcessingMode="Remote" Width="100%" BackColor="#9EBFF6" LinkActiveColor="0, 51, 153" ShowBackButton="True" SizeToReportContent="True">

     

    <ServerReport ReportPath="/Folder/CompetitorPrice" ReportServerUrl="http://localhost/reportserver" />

     

    </rsweb:ReportViewer>

     

    </

    asp:Content>


    After your post I've tried "to play" with ShowBackButton / SizeToReportContent values and it seems to work nice with:

    AsyncRendering

    ="True"

    ="True"

     

     

     

     

     

    I still need more testing to approve this solution but at the moment I think you've helped me a lot! It was a nightmare for last several days. Thank you a lot for advice! I'll write results when I finish testing.

    Andriy
    I still need more testing to approve this solution but at the moment I think you've helped me a lot! It was a nightmare for last several days. Thank you a lot for advice! I'll write results when I finish testing.

    Andriy

     

    I still need more testing to approve this solution but at the moment I think you've helped me a lot! It was a nightmare for last several days. Thank you a lot for advice! I'll write results when I finish testing.

    Andriy
    I still need more testing to approve this solution but at the moment I think you've helped me a lot! It was a nightmare for last several days. Thank you a lot for advice! I'll write results when I finish testing.

    Andriy

     

     

     

     

     

     

    • Edited by Andriy Sunday, February 28, 2010 7:51 PM grammar errors
    Sunday, February 28, 2010 7:48 PM
  • After additional testing I've found that after setting AsyncRendering="True" the problem with scrolling disappears!

    BUT UNFORTUNATELY very nice feature "Group header should remain visible while scrolling" does not work under AsyncRendering="True"!!! Moreover after driilthrough into Matrix columns groups I found problems with my web page layout - it becames UGLY whereas it was OK under AsyncRendering="False".

    So unfortunately it is not acceptable to set AsyncRendering="True".

    It irritates our customers a lot! And question to use MS SQL RS or not to use appears.

    Could someone answer: Is it possible with RS 2005 / ReportViewer 9,10 to have workable Matrix row drillthrough postback SCROLL POSITION SAVING and workable feature "Group header should remain visible while scrolling"?

    If no: Is it fixed in ReportViewer 2010 / RS 2008? Or is it time to think about another report engine?

    Any help is appreciated a lot.

    Andriy

    Sunday, February 28, 2010 11:33 PM
  • Using AyncRendering = true does support fixed headers.  I suspect something else is interfering.  The AsyncRendering property has a number of side effects in VS 2005 and 2008.  This scenario is greatly simplified in VS 2010.  More information is available here:

    http://blogs.msdn.com/brianhartman/archive/2010/01/21/asyncrendering-and-all-the-baggage-that-comes-with-it.aspx
    Sunday, February 28, 2010 11:52 PM
    Moderator
  • Brian, thanks for great article! Due to it I've got the reason of my Matrix "sroll position/fixed header" problem:

    The reason of trouble was in my ReportViewer's server side "Toggle" and "PageNavigation" event handlers under AyncRendering = true.

    When I remove ReportViewer's "Toggle" and "PageNavigation" event handlers from my web page - "sroll position" and "fixed header" start working almost nice under "AyncRendering = true".

    As I understand: only IFrame is reloaded without "Toggle" and "PageNavigation" handlers so "sroll position" is being maintained. But if handlers are "on" aspx postback occurs and "sroll position" is not restored. It's not good but hope to be fixed in ReportViewer 10. Will it? (In the meantime "Sort" and other event handlers do not impact on correct "sroll position" working. It's a bit strange...)

    ANOTHER ISSUE: "sroll position/fixed header" works simultaneously "almost well" but "sroll position" after toggling Matrix row "plus sign" IS NOT EXACTLY CORRECT when "fixed header" enabled. I mean that top row after "toggling" is being covered by "fixed header" but it should be positioned exaclty under the "fixed header". Here are illustrating images: Incorrect: http://www.strongust.com/incorrect.gif  Correct: http://www.strongust.com/correct.gif

    Is it "known issue"? or just the reason is in my settings?

    Can it be fixed(workarounds?) for ReportViewer 8/9. RS 2005 / 2008 ? Is it expected to be fixed in ReportViewer 10? Does it make sense to create separate forum thread on this issue?

    Thank you for help! Looking forward VS 2010 and ReportViewer 10!

    Andriy

    Monday, March 1, 2010 3:07 AM
  • That is a known problem with VS 2005/2008.  And it is fixed in VS 2010 - the toggle will remain in position after the report page update.
    Tuesday, March 2, 2010 4:27 AM
    Moderator