2014-08-27 55 views
0

我想列出在報告服務器中所做的所有訂閱。爲此,我創建了一個示例控制檯應用程序,並添加Microsoft.ReportViewer.WebForms.dll的坐落在SQL Server Reporting Service 2010 |不在控制檯應用程序中工作

%程序文件(x86)參考%\微軟的Visual Studio 11.0 \的ReportViewer \ Microsoft.ReportViewer.WebForms .DLL

但是,當我嘗試使用以下

ReportingService2010.ReportingService2010 R =新 ReportingService2010.ReportingService2創建ReportingService2010的對象010();

它不會讓我創建對象,並拋出一個編譯時錯誤

錯誤CS0246:類型或命名空間名稱「ReportingService2010」 找不到(是否缺少使用指令或裝配 參考?)

哪個ddl的我在這裏失蹤請幫助我。

回答

0

相信ReportingService2010不是參考Microsoft.ReportViewer.WebForms的一部分。 您需要爲您的項目添加Web引用。

下面是微軟一個偉大的教程,它表明你如何將Web引用添加到SQL Server報告Web服務: http://technet.microsoft.com/en-us/library/ms169926.aspx

如果按照這些步驟,你應該能夠使用ReportingService2010這樣的:

ReportingService2010 rs = new ReportingService2010(); 
相關問題