In VS2010 Beta 2, the Web Report Viewer does not display the content of the report, whether I use Local or Remote mode.
It only display the following "disabled" bar [image]
The report I created works fine in the Report Server.
Here is the code for displaying the report:
ReportViewer1.ProcessingMode = ProcessingMode.Remote;
ReportViewer1.ServerReport.ReportServerUrl = new Uri("http://localhost/reportserver");
ReportViewer1.ServerReport.ReportPath = "/MyReports/Report1";
ReportViewer1.ServerReport.Refresh();
Or
ReportViewer1.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Local;
ReportViewer1.LocalReport.ReportPath = Server.MapPath("Report1.rdlc");
ReportViewer1.LocalReport.DataSources.Add(new ReportDataSource("DataSet1", myDataSet);
ReportViewer1.LocalReport.Refresh();
And I've already added the ScriptManager to the webpage, and the corresponding handlers entries in the web.config (both in system.web and system.webServer section).
The same code works fine in VS2008.
Anyone encountered the same issue?
Prior to Beta 2, VS came loaded with Report Viewer 9.0 (same as in VS 2008). Beta 2 uses Report Viewer 10.0 which handles asynchronous rendering differently (using ASP.Net AJAX vs. rendering content in an iframe). Is the reportviewer showing the loading indicator indefinitely? If so, then you probably have some code in your page's load event that is telling the ReportViewer to restart report processing. If you do this every postback then the viewer gets stuck in an infinite loop. Simply adding a check of IsPostBack to your page's load event should fix this problem.
For more, see "Reports Never Stop Loading With VS 2010" in Brian Hartman's Report Viewer Blog.
just use
if(!isPostBack)
{
//your code here
}
to avoid ReportViewer infinite loading loop with reportviewer version 10.0.0 and
VS2010 and using SSRS2008
Same problem...
We've added a reportviewer control to a page which is derived from a custom base form. On this base form we override the RenderChildren method. As example see article: http://msdn.microsoft.com/en-us/library/system.web.ui.control.renderchildren.aspx
We've had no problems with this prior to Beta 2, and our framework heavily relies on this functionality.
I had this same issue and MattSlay's answer made me realize the Refresh method has to be called only when the page is not a postback, my working Page_Load:
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
MainReportViewer.ProcessingMode = ProcessingMode.Remote;
string reportName = this.Request.QueryString["ReportName"];
MainReportViewer.ServerReport.ReportPath = "/Pulse Reports/" + reportName;
MainReportViewer.ServerReport.ReportServerUrl = new Uri("http://10.1.0.48/ReportServer");
MainReportViewer.ServerReport.Refresh();
}
}