2015-09-17 43 views
1

我創建了一個使用Microsoft.ReportViewer顯示rdlc報告的應用程序。該應用程序在開發中運行良好。機。現在我試圖將它部署在客戶端計算機上(Windows 7),但是當我生成報告時什麼也沒有發生。一點都沒有。沒有錯誤信息,也沒有例外。我猜這是由於缺少Microsoft.ReportViewer.Winforms.dll /或框架?我已經爲此dll設置copyLocal = true,但仍然沒有運氣。有什麼問題?部署後無法在客戶機上生成RDLC報告

將消息框放在不同的地方並捕獲異常後,我發現ReportViewer需要安裝在客戶機上。這些是被顯示出來

enter image description here

enter image description here

+0

您正在將.dll複製到客戶機? –

+0

@SethKitchen哪個DLL? – WAQ

+1

我建議你在打電話給記者的時候給某些相關的方法添加某種文本消息,以幫助確定客戶端電腦上的錯誤。您必須提供更多信息才能獲得您尋求的幫助。在此時幾乎不可能提供幫助,因爲您無法提供錯誤,也沒有發佈任何相關代碼 – Oceans

回答

0

事實證明,我需要在客戶機上安裝ReportViewer.exe或運送與安裝程序所需的dll文件所需的錯誤消息。所以我添加了以下dll的引用並標記爲CopyLocal = True,這解決了我的問題。

<Reference Include="Microsoft.ReportViewer.Common, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL"> 
    <SpecificVersion>False</SpecificVersion> 
    <HintPath>C:\Windows\assembly\GAC_MSIL\Microsoft.ReportViewer.Common\11.0.0.0__89845dcd8080cc91\Microsoft.ReportViewer.Common.dll</HintPath> 
    <Private>True</Private> 
</Reference> 
<Reference Include="Microsoft.ReportViewer.ProcessingObjectModel, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL"> 
    <SpecificVersion>False</SpecificVersion> 
    <HintPath>C:\Windows\assembly\GAC_MSIL\Microsoft.ReportViewer.ProcessingObjectModel\11.0.0.0__89845dcd8080cc91\Microsoft.ReportViewer.ProcessingObjectModel.DLL</HintPath> 
    <Private>True</Private> 
</Reference> 
<Reference Include="Microsoft.ReportViewer.WinForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL"> 
    <HintPath>C:\Windows\assembly\GAC_MSIL\Microsoft.ReportViewer.WinForms\11.0.0.0__89845dcd8080cc91\Microsoft.ReportViewer.WinForms.DLL</HintPath> 
    <Private>True</Private> 
</Reference> 
<Reference Include="Microsoft.SqlServer.Types, Version=10.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL"> 
    <SpecificVersion>False</SpecificVersion> 
    <HintPath>C:\Windows\assembly\GAC_MSIL\Microsoft.SqlServer.Types\11.0.0.0__89845dcd8080cc91\Microsoft.SqlServer.Types.dll</HintPath> 
    <Private>True</Private> 
</Reference>