Managing ReportViewer and Ajax UpdatePanel

Have any of you ever found a way to get Microsoft View Viewer Control (Web) to work from the Ajax UpdatePanel?

+4
source share
5 answers

The only way is to create an iframe with the message iirc there. However, this post here the guy claims that he has a way to fix it with some kind of code. although I didn’t even try to do this, since I never had to show any of my reports in the update panel. I try to ensure that my reports are external from any ajax applications, for example, when a report is requested, I will open a new window using only the report. My users are somehow better.

+3
source

i fixed this error 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 the web configuration as follows

of

<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 at 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> 

+3
source

I never tried, but I'm sure that control will not work right away. I am sure he needs to download additional Javascript because it adds so much complexity, so you may need to download them before updating the panel.

0
source

I can also confirm that the latest version (2010) mentioned in the previous article fixes the problem. It also eliminates the need to explicitly specify AsyncRendering = False: I mention this because other suggestions there on the Internet say to set this value for this property

0
source

Here is an example:

 <asp:Button ID="Button1" runat="server" OnClick="ViewReport_Clicked" Text="View Report" SkinID="ButtonA" /> <asp:UpdatePanel ID="TFD_UP" runat="server"> <ContentTemplate> <rsweb:ReportViewer ID="ReportViewer1" runat="server" SizeToReportContent="True" Height="202px" Width="935px" Font-Names="Verdana" Font-Size="8pt" InteractiveDeviceInfos="(Collection)" WaitMessageFont-Names="Verdana" WaitMessageFont-Size="14pt" Visible="false"> <LocalReport ReportPath="Reports\Report4.rdlc"> <DataSources> <rsweb:ReportDataSource DataSourceId="SqlDataSourceArchiSpecs" Name="Proc_TechFilesDownloadsDataSetParent" /> </DataSources> </LocalReport> </rsweb:ReportViewer> <asp:SqlDataSource ID="SqlDataSourceArchiSpecs" runat="server" ConnectionString="<%$ ConnectionStrings:ArchiSpecsDBConnectionString %>" SelectCommand="PROC_TECHNICALFILES_DOWNLOAD_DETAILS" SelectCommandType="StoredProcedure"> <SelectParameters> <asp:Parameter Name="supId" Type="Int32" /> <asp:Parameter Name="startDate" Type="DateTime" /> <asp:Parameter Name="endDate" Type="DateTime" /> </SelectParameters> </asp:SqlDataSource> </ContentTemplate> <Triggers> <asp:AsyncPostBackTrigger ControlID="Button1" EventName="Click" /> </Triggers> </asp:UpdatePanel> 
0
source

Source: https://habr.com/ru/post/1277374/


All Articles