2

我已经用 C# 编写了一个报告和一个简单的 Web 程序,它正在调用该报告。当我运行该程序时,它在 Firefox 中完美运行,但在 IE 8.0 中却不行。在 IE 中,它会一直运行,直到您收到以下错误消息:底层连接已关闭:接收时发生意外错误。无法从传输连接读取数据:现有连接被远程主机强行关闭。现有连接被远程主机强行关闭。

任何人以前都遇到过这个问题并有解决方案。

提前感谢所有回复的人!

生成报告的代码: ReportViewer1.ProcessingMode = ProcessingMode.Remote;

        ServerReport serverReport = ReportViewer1.ServerReport;
        // Set the report server URL and report path
        serverReport.ReportServerUrl =
            new Uri("http://localhost/Reportserver");
        serverReport.ReportPath =
            "/WinLife.Accounting.Report/Report_Accountingvoucher";
        // Create the sales order number report parameter
        List<ReportParameter> paramList = new List<ReportParameter>();
        paramList.Add(new ReportParameter("Workplace", Session["WorkPlace"].ToString()));
        paramList.Add(new ReportParameter("BookkeepingYear", Session["BookkeepingYear"].ToString()));
        paramList.Add(new ReportParameter("SerialNo", Session["SerialNo"].ToString()));
        paramList.Add(new ReportParameter("DocumentType", Session["DocumentType"].ToString()));
        paramList.Add(new ReportParameter("IndentDate", Session["IndentDate"].ToString()));
        paramList.Add(new ReportParameter("AccountingVoucherCode", Session["AccountingVoucherCode"].ToString()));
        paramList.Add(new ReportParameter("UserId", Session["UserId"].ToString()));
        paramList.Add(new ReportParameter("Password", Session["Password"].ToString()));

        ReportViewer1.ServerReport.SetParameters(paramList);
        ReportViewer1.ServerReport.Refresh();

如果我在 IE8 中运行 reportviewer,它看起来还不错。报告服务器,sql-server 安装在我的机器上。我从 VS2008 以调试模式运行程序,并且安装了 Windows 7。我试图在受信任的站点中设置本地主机,但它没有改变任何东西。似乎它在 SQL-Server 中执行任何操作之前就被停止了。这适用于 Firefox。

4

3 回答 3

0

也许您返回的报告数据非常好。您可以设置报表处理的超时值。请参阅以下链接:

设置报表处理的超时值

于 2010-02-10T12:45:33.397 回答
0

我正在经历完全相同的事情(包括它与FF一起使用的事实)......

解决方案是将“浏览器模式”设置为 IE7...按照以下方式进行操作: 1. 工具 -> 开发人员工具。2. 浏览器模式:-> Internet Explorer 7

顺便说一句 - 微软很烂......

于 2010-02-16T07:35:06.497 回答
0

您是否尝试将站点添加到受信任区域?我有一些类似的问题,这就是我修复它的方式。

于 2010-02-10T12:39:56.613 回答