RDLC的部署

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 的工具栏的文字为中文。

 

 

 

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值