MS ReportViewer control: after drillthrough, hangs on "Loading..."

I have a ReportViewer control (10.0) inside an aspx (.NET 4.0) web page hosted in IIS 7.5. The default report view works fine, but as soon as I click any link for drillthrough/drilldown, the animated "Loading..." message box pops up and stays there forever. This happens every time; it didn't used to happen on win03/IIS6.

I verified that the stored procedure and the RDLC file are both good. No problems or errors, stored proc returns results fast. Connection strings confirmed valid, etc.

In Web.config I have:

<pages enableEventValidation="false">
        <add tagPrefix="rsweb" namespace="Microsoft.Reporting.WebForms" assembly="Microsoft.ReportViewer.WebForms, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
      <add name="ReportViewerWebControlHandler" preCondition="integratedMode" verb="*" path="Reserved.ReportViewerWebControl.axd" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
    <validation validateIntegratedModeConfiguration="false" />

Open in new window

Note: <pages enableEventValidation="false">  (this has to be false or else I get nasty ajax-related javascript errors)

In the aspx I have:
<asp:scriptmanager ID="ScriptManager1" runat="server" />
<rsweb:ReportViewer ID="ReportViewer1" BackColor="White" OnDrillthrough="DrillHandler" OnBack="xqtBackup" runat="server" />
LVL 11
Who is Participating?
Alfred A.Commented:
-------> I get nasty ajax-related javascript errors

I believe I experienced this before and what I did is disabled the partial rendering within the page.   See the sample code below. (I am not sure if you are using VB or C# but I created both below).  By the way, I put a ScriptManager control in a Master page.  You can just remove the FindControl part if your ScriptManager control is in the page.  Also, you don't need to set enableEventValidation="false if you do what I suggested.  I hope this helps.


Private Sub Page_Init(ByVal sender As Object, ByVal e As System.EventArgs) Handles Page.Init
     Dim ScriptManager1 = CType(Master.FindControl("ScriptManager1"), ScriptManager)
     ScriptManager1.EnablePartialRendering = False
End Sub


protected void Page_Init(object sender, EventArgs e)
     var ScriptManager1 = (ScriptManager)Page.Master.FindControl("ScriptManager1");
     ScriptManager1.EnablePartialRendering = false;

Open in new window

Alfred A.Commented:
Check this out.  It might help you sort your problem with AJAX and Report Viewer:
SweatCoderAuthor Commented:

Thanks, you nailed it. Although it was easier to do this declaratively:

<asp:scriptmanager ID="ScriptManager1" EnablePartialRendering="false" runat="server" />

No need to write code in codebehind.
Alfred A.Commented:
Yes.  That would be a better solution if you really don't need partial rendering in your page.

In my case before, my ScriptManager was in a Master Page and there were Content Pages that I need to enable partial rendering because I do partial-page updates in those pages and that is why I put it in code-behind.  

Glad I could help.  :-)
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.