RDLC的部署

来源:互联网 发布:淘宝代拍软件 编辑:程序博客网 时间:2024/04/29 17:41

rdlc 相比微软的其他产品来说,做得还真是够烂的了,比水晶报表也烂得多。 但不知为何我还是宁可先择 rdlc。并且渐渐上手了。

rdlc 和水晶报表一样存在部署的问题。

 

如果服务器不受你控制,可以把和 ReportViewer 相关的 dll 拷出来,再上传到网站的 bin 目录下:

运行:cmd

cd C:/WINDOWS/assembly

dir

cd gac_msil

dir *reportview* /s

copy C:/WINDOWS/assembly/GAC_MSIL/Microsoft.ReportViewer.Common/9.0.0.0__b03f5f7f11d50a3a/Microsoft.ReportViewer.Common.dll C:/
copy C:/WINDOWS/assembly/GAC_MSIL/Microsoft.ReportViewer.Common.resources/9.0.0.0_zh-CHS_b03f5f7f11d50a3a/Microsoft.ReportViewer.Common.resources.dll C:/
copy C:/WINDOWS/assembly/GAC_MSIL/Microsoft.ReportViewer.Design/9.0.0.0__b03f5f7f11d50a3a/Microsoft.ReportViewer.Design.dll C:/
copy C:/WINDOWS/assembly/GAC_MSIL/Microsoft.ReportViewer.Design.resources/9.0.0.0_zh-CHS_b03f5f7f11d50a3a/Microsoft.ReportViewer.Design.resources.dll C:/
copy C:/WINDOWS/assembly/GAC_MSIL/Microsoft.ReportViewer.ProcessingObjectModel/9.0.0.0__b03f5f7f11d50a3a/Microsoft.ReportViewer.ProcessingObjectModel.dll C:/
copy C:/WINDOWS/assembly/GAC_MSIL/Microsoft.ReportViewer.WebDesign/9.0.0.0__b03f5f7f11d50a3a/Microsoft.ReportViewer.WebDesign.dll C:/
copy C:/WINDOWS/assembly/GAC_MSIL/Microsoft.ReportViewer.WebDesign.resources/9.0.0.0_zh-CHS_b03f5f7f11d50a3a/Microsoft.ReportViewer.WebDesign.resources.dll C:/
copy C:/WINDOWS/assembly/GAC_MSIL/Microsoft.ReportViewer.WebForms/9.0.0.0__b03f5f7f11d50a3a/Microsoft.ReportViewer.WebForms.dll C:/
copy C:/WINDOWS/assembly/GAC_MSIL/Microsoft.ReportViewer.WebForms.resources/9.0.0.0_zh-CHS_b03f5f7f11d50a3a/Microsoft.ReportViewer.WebForms.resources.dll C:/
copy C:/WINDOWS/assembly/GAC_MSIL/Microsoft.ReportViewer.WinForms/9.0.0.0__b03f5f7f11d50a3a/Microsoft.ReportViewer.WinForms.dll C:/
copy C:/WINDOWS/assembly/GAC_MSIL/Microsoft.ReportViewer.WinForms.resources/9.0.0.0_zh-CHS_b03f5f7f11d50a3a/Microsoft.ReportViewer.WinForms.resources.dll C:/

 

如果服务器受你控制,就好办得多:

下载 Microsoft Report Viewer 2008 SP1 Redistributable

下载 Microsoft Report Viewer Redistributable 2008 SP1 语言包

按顺序在服务器上安装它们就可以了。

 

千万要记得要重启一下IIS。

 

Microsoft Report Viewer 2008 SP1 应该是比较新的版本了,如果版本太低(如,VS 自带的),它使用和提供给客户端的打印控件的版本也是比较低的,貌似是 RSClientPrint Class 2005.90.3000.0。这个版本存在安全漏洞,自动更新过的或者是新版的 Windows 不会提示下载和不使用这个控件。Microsoft Report Viewer 2008 SP1 使用和提供给客户端的打印控件的版本为:RSClientPrint 2005 Class 2005.90.3279.0。

 

在 web.config 中加上 <globalization culture="zh-CN" uiCulture="zh-CN" /> 可以让 Report Viewer 的工具栏的文字为中文。

 

 

 

原创粉丝点击