SQL Server Reporting Services - 运行报表时出错(Azure网站部署问题?)

ken*_*nxl 7 asp.net azure reporting-services

我有一个ASP.NET MVC前端,它列出了SQL Azure Reporting Services上的报告.用户选择要运行的报告,并在另一个浏览器窗口中加载该报告.问题是,当报告在某些浏览器上运行时(例如,Win7上的IE10),显示的所有内容都是以下消息:

Method not found: 'Boolean Microsoft.ReportingServices.Common.DateTimeUtil.TryParseDateTime(System.String, System.IFormatProvider, System.DateTimeOffset ByRef, Boolean ByRef)'.
Run Code Online (Sandbox Code Playgroud)

在Win7上使用Chrome报告"半工作" - 我在顶部栏中显示日期时间框和另一个下拉菜单,当我单击"运行"按钮时,我会获得报告导航栏但不会显示报告正文.我没有收到上面的消息.

该网站发布到Azure网站.我引用了以下DLL并将CopyLocal设置为true:

Microsoft.ReportViewer.Common
Microsoft.ReportViewer.WebForms
Microsoft.ReportViewer.DataVisualization
Microsoft.ReportViewer.ProcessingObjectModel
Run Code Online (Sandbox Code Playgroud)

发布的报告在我的dev机器上工作正常,我安装了ReportViewer 2012可再发行组件(控件的版本11).

所以,问题:

我在发布的网站上遗漏了哪些其他可再发行的dll?什么是Microsoft.ReportingServices.Common?'ByRef'似乎意味着这是VB - 这是一个客户端脚本组件吗?我是否需要在客户端计算机上安装以查看报告?

cra*_*aus 7

同样的问题发生在部署发生后在IE和Firefox上找不到错误的方法,而在本地运行一切正常.

 Method not found: 'Boolean Microsoft.ReportingServices.Common.DateTimeUtil.TryParseDateTime(System.String, System.IFormatProvider, System.DateTimeOffset ByRef, Boolean ByRef)'.
Run Code Online (Sandbox Code Playgroud)

发生的事情是,在我们的本地bin文件中,有一个比部署服务器更新版本的Microsoft.ReportViewer dll.当部署服务器添加了dll时,它从GAC中选择的版本与在本地使用的版本不同.版本11.0.2而不是11.0.33导致未命中匹配.将dll更新到本地计算机上的相同版本后,它修复了问题.有可能在您重新部署正确的dll后使用,修复您的问题.

要验证bin文件夹和部署文件夹中dll的版本,可以在导航到包含dll的文件夹后使用简单的power shell脚本.

dir *.dll | %{ $_.VersionInfo }
Run Code Online (Sandbox Code Playgroud)


ken*_*nxl 0

这已经解决了我的问题,尽管我不得不承认我不知道为什么......

只需将 SizeToReportContent="true" 属性添加到 aspx 页面中的标记即可,例如:

<rsweb:ReportViewer ID="ReportViewer1" runat="server" SizeToReportContent="true" Font-Names="Verdana" Font-Size="8pt" Height="100%" ProcessingMode="Remote" WaitMessageFont-Names="Verdana" WaitMessageFont-Size="14pt" Width="100%">
    <ServerReport />
</rsweb:ReportViewer>
Run Code Online (Sandbox Code Playgroud)

神奇的是,这一切似乎都有效。