views:

3157

answers:

4

Did anyone of you ever find a way of getting the Microsoft Report Viewer Control (Web) to work from within an Ajax UpdatePanel?

A: 

Never tried really, but I'm sure that control wouldn't work straight away. I'm pretty sure it needs to load some extra Javascript, because it adds so much complexity, so you might need to load those before updating the panel.

dguaraglia
+1  A: 

The only way really is to create an iframe with the report in there iirc. However, this post here a guy claims he has a way to fix it with some code. albeit i havnt even tried this as I have never had a need to show any of my reports in an update panel. I tend to keep my reports external of any ajax apps, for example when a report is requested i will open a new window with just the report. My users like that better anyhow.

mattlant
A: 

i fixed this bug by using

Microsoft Report Viewer 2010 Redistributable Package from :

http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=a941c6b2-64dd-4d03-9ca7-4017a0d164fd

then change web config as following

from

        <assemblies>                <add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />                <add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />                <add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />                <add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />                <add assembly="Microsoft.ReportViewer.WebForms, Version=9.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />                <add assembly="Microsoft.ReportViewer.Common, Version=9.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />            </assemblies>
        <assemblies>

            <add assembly="Microsoft.ReportViewer.WebForms, Version=9.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />

            <add assembly="Microsoft.ReportViewer.Common, Version=9.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />

        </assemblies>

to

  <assemblies>

    <add assembly="Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />

    <add assembly="Microsoft.ReportViewer.Common, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />

  </assemblies>

add this to runtime

<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">

  <dependentAssembly>

    <assemblyIdentity name="Microsoft.ReportViewer.WebForms" publicKeyToken="b03f5f7f11d50a3a"/>

    <bindingRedirect oldVersion="9.0.0.0-9.1.0.0" newVersion="10.0.0.0"/>

  </dependentAssembly>

</assemblyBinding>

For those that see this solution, just know you need to be using SQL Server 2008 or higher, otherwise the Report Viewer 2010 won't work.
Jeff Miles
A: 

I can also confirm that the latest release (2010) mentioned in previous post corrects issue. It also removes the need to explicitly set AsyncRendering=False: I mention this because other suggestions out there on the web say to set that value on that property

JC