在VS2010 Beta 2中,在Web报表查看器不显示报告的内容报表、查看器、报告、内容

2023-09-04 02:15:34 作者:缺失的安全感

在VS2010 Beta 2中,在Web报表查看器不显示报告的内容,我是使用本地或远程方式。

In VS2010 Beta 2, the Web Report Viewer does not display the content of the report, whether I use Local or Remote mode.

只显示以下禁用栏中 [图]

我创作的作品精细报表服务器中的报告。

The report I created works fine in the Report Server.

下面是code,用于显示报告:

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();

        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();

和我已经添加了的ScriptManager到网页,并在web.config中的相应的处理程序项(无论是在System.Web程序和system.webServer节)。

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).

同样的code正常工作在VS2008。

The same code works fine in VS2008.

任何人都遇到了同样的问题?

Anyone encountered the same issue?

推荐答案

在此之前Beta 2中,VS来到装有报表查看器9.0(相同VS 2008)。 Beta 2的使用报告查看器10.0哪些不同的方式处理异步呈现(使用ASP.Net AJAX与内容呈现在iframe中)。是的ReportViewer呈现出无限的负载指示?如果是这样,那么你可能有一些code在你的页面的加载事件被告诉的ReportViewer重新启动报表处理。如果你每天都这样回发那么观众被卡在一个无限循环。简单地增加一个检查的IsPostBack 您网页的载入事件应该解决这个问题。

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.

有关更多信息,请参阅Reports永远不要停止加载与VS 2010 的布莱恩·哈特曼的报告查看博客。

For more, see "Reports Never Stop Loading With VS 2010" in Brian Hartman's Report Viewer Blog.