当SizeToReportContent = False时,2010年ReportViewer控件无法在Internet Explorer中呈现 [英] 2010 ReportViewer Control Not Rendering in Internet Explorer When SizeToReportContent = False

查看:86
本文介绍了当SizeToReportContent = False时,2010年ReportViewer控件无法在Internet Explorer中呈现的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,


我一天中大部分时间都在浏览互联网寻找解决方案但很遗憾看起来这可能是一个相对较新的问题。


自从我们更新报告Web应用程序以使用新的2010 ReportViewer后,我们无法在IE中呈现报告。我们已经在IE 7和IE 8中对此进行了测试。但是我们能够在Firefox 4中呈现报告。我们
正在使用SQL Server 2008 RDL报告和Visual Studio 2010。


我今天发现,如果我将SizeToReportContent属性设为True而不是False,我们的报告将开始在IE中呈现。这个ReportViewer控件位于UpdatePanel内部,但我认为这不会产生影响。


ReportViewer工具栏和参数始终正确显示并正常运行。但是在单击"查看报告"按钮后,唯一改变的是"页面计数"标签。页面计数对于报告始终是正确的,但报告永远不会在控件中呈现
。此外,我可以单击导出报告,报告导出完全正常,没有任何问题。我还在报表服务器上查看了报表,它可以正常加载和运行。我在数据库中检查了报告
服务器的错误日志,并且每次都记录成功。


如果您需要更多信息,请告诉我。


提前致谢!


 


 

解决方案

不确定是什么问题,但是你应该先检查你的Web.config文件,看看你是否真的在使用VS2010 ReportViewer,因为你提到了更新你的web应用程序。只需将VS2008应用程序升级到VS2010,就不会自动将
更新到VS2010查看器。


检查您的Web.config是否包含以下行。



<



 



添加
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
"



/>







...



<



 



 


add
扩展名 = " .rdlc "
type = " Microsoft.Reporting.RdlBuildProvider,
Microsoft.ReportViewer.WebForms,Version = 10.0.0.0,Culture = neutral,PublicKeyToken = b03f5f7f11d50a3a
"



/>







...



<



 



 


add
名称 = " ReportViewerWebControlHandler "
preCondition = " integratedMode "
动词 = " * "
路径 = " Reserved.ReportViewerWebControl.axd "
type = " Microsoft.Reporting.WebForms.HttpHandler,
Microsoft.ReportViewer.WebForms,Version = 10.0.0.0,Culture = neutral,PublicKeyToken = b03f5f7f11d50a3a
"



/>


 






 




 


您的ASP.NET页面也应该包含以下行:

<%



 


@
注册
assembly =" Microsoft.ReportViewer.WebForms,
Version = 10.0.0.0,Culture = neutral,PublicKeyToken = b03f5f7f11d50a3a"

命名空间 =" Microsoft.Reporting.WebForms"
tagprefix =" rsweb"


%>





Hello,

I have spent most of the day browsing the internet looking for a solution but unfortunately it looks like this may be a relatively new problem.

Ever since we updated our reporting web application to use the new 2010 ReportViewer we have not been able to get our reports to render in IE. We have tested this in IE 7 and IE 8. However we were able to get the reports to render in Firefox 4. We are using SQL Server 2008 RDL reports and Visual Studio 2010.

I discovered today that if I make the SizeToReportContent property True instead of False our reports start to Render in IE. This ReportViewer control is inside an UpdatePanel but I do not think that should make a difference.

The ReportViewer toolbar and parameters always show up correctly and function correctly. But after clicking the View Report button the only thing that changes is the Page Count label. The page count is always correct for the report but the report is never rendered in the control. Also I can click export report and the report exports perfectly fine without any issue. I have also viewed the report on the report server and it loads and runs without issue. I checked the error log in the database for the report server and it logs as a success every time.

Please let me know if you need any more information.

Thanks in advance!

 

 

解决方案

Not sure what the problem is, but you should first check your Web.config file to see whether you're actually using the VS2010 ReportViewer, since you mentioned updating your web application. By simply upgrading a VS2008 app to VS2010 doesn't automatically update to the VS2010 viewer.

Check if youre Web.config contains the following lines.

<

 

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"

/>

...

<

 

 

add extension=".rdlc" type="Microsoft.Reporting.RdlBuildProvider, Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"

/>

...

<

 

 

add name="ReportViewerWebControlHandler" preCondition="integratedMode" verb="*" path="Reserved.ReportViewerWebControl.axd" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"

/>

 

 

 

Your ASP.NET page should also have the following line:

<%

 

@ Register assembly="Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" namespace="Microsoft.Reporting.WebForms" tagprefix="rsweb"

%>


这篇关于当SizeToReportContent = False时,2010年ReportViewer控件无法在Internet Explorer中呈现的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆