It’s good that I searched and tried different ideas for a good six hours, and I did not find a solution.
I am using Visual Studio 2010, C #, ASP.Net 4.0 and ReportViewer 10.
I have a javascript function that forces an asynchronous call to update report parameters with new values, and then reloads the report. Everything runs as expected, but the report does not display new data.
If I do a normal postback with a button, it works, but as soon as it is an asynchronous postback, it doesn't work. I read something that rendering might be at the end of the page life cycle, etc., but that didn't leave me anywhere. Here is the code I use to set the parameters.
Code for:
//Tried with and without this line and it makes no differed
ReportViewer1.Reset();
ReportViewer1.ProcessingMode = ProcessingMode.Remote;
List<ReportParameter> rParams = new List<ReportParameter>();
rParams.Add(new ReportParameter("UserID", SelectedUserID.ToString(), false));
rParams.Add(new ReportParameter("PayrollSalesMonthID", "13", false));
ReportViewer1.ServerReport.ReportServerUrl = new Uri("...");
ReportViewer1.ServerReport.ReportPath = "...";
ReportViewer1.ServerReport.SetParameters(rParams);
//Tried with and without this line and it makes no differed
ReportViewer1.ServerReport.Refresh();
Markup:
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<rsweb:ReportViewer ID="ReportViewer1" runat="server" BorderStyle="None" Width="100%" Height="98%" SizeToReportContent="true" AsyncRendering="true" />
</rsweb:ReportViewer>
UPDATE
ASP Script Manager, EXT.Net Resource Manager , , . , , . , iFrame .
<ext:ResourceManager ID="ResourceManager1" runat="server" Locale="en-GB" />
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
, ?