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 的工具欄的文字爲中文。

 

 

 

發佈了31 篇原創文章 · 獲贊 4 · 訪問量 3萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章