使用報表檢視器控制項整合 Reporting ServicesIntegrate Reporting Services Using Report Viewer Controls

MicrosoftMicrosoft Visual Studio 2015 提供兩個報表檢視器控制項,可將報表檢視功能整合到應用程式。Visual Studio 2015 provides two Report Viewer controls for integrating report viewing functionality into your applications. 一個版本是用於 Windows Form 應用程式,另一個版本則是用於 Web Form 應用程式。There is a version for Windows Forms-based applications and one for Web Forms applications. 每個控制項都提供類似的功能,但是每個功能都是針對其個別的環境所設計的。Each control provides similar functionality but each is designed to target their individual environments. 兩個控制項都可以處理已經部署到報表伺服器的報表 (遠端處理模式),或是已經複製到尚未安裝 MicrosoftMicrosoft SQL ServerSQL Server Reporting ServicesReporting Services 之電腦上的報表 (本機處理模式)。Both controls can process reports that have been deployed to a report server (remote processing mode) or have been copied to a computer where MicrosoftMicrosoft SQL ServerSQL Server Reporting ServicesReporting Services has not been installed (local processing mode).

報表檢視器控制項並未內建支援動態適應具有不同螢幕解析度的不同裝置。The Report Viewer control does not include built-in support for dynamically adapting to different devices with different screen resolutions.

遠端處理模式Remote Processing Mode

遠端處理模式是檢視已經部署到報表伺服器之報表的建議使用方法。Remote processing mode is the preferred method for viewing reports that have been deployed to a report server. 遠端處理模式提供下列優點:Remote processing mode provides the following advantages:

  • 遠端處理可提供執行報表最佳化的方案,因為報表伺服器會處理報表。Remote processing provides an optimized solution for running reports because the report is processed by the report server.

  • 因為報表伺服器會處理所有的程序,所以報表要求可在向外延展部署中由多部報表伺服器處理,或在單一向上延展案例中由具備多個處理器的伺服器處理。Because all processing is handled by the report server, a report request can be processed by multiple report servers in a scale-out deployment or a server that has multiple processors in a scale-up scenario.

此外,在遠端模式中執行的報表可以利用報表伺服器的完整功能,包括所有的轉譯與資料延伸模組。In addition, reports run in remote mode can utilize the full functionality of the report server including all rendering and data extensions.

注意

以遠端處理模式執行報表檢視器控制項時,其可用延伸模組清單必須取決於報表伺服器上所安裝的 Reporting ServicesReporting Services 版本。The list of extensions available to the Report Viewer control when it is running in remote processing mode depends on the edition of Reporting ServicesReporting Services that is installed on the report server.

本機處理模式Local Processing Mode

本機處理模式提供替代的方法,可在未安裝 Reporting ServicesReporting Services 的情況下檢視和轉譯報表。Local processing mode provides an alternative method for viewing and rendering reports when Reporting ServicesReporting Services is not installed. 與遠端處理不同的是,只有報表伺服器提供的功能子集可在控制項中使用。Unlike remote processing only a subset of the functionality provided by the report server is available in the control. 在本機處理模式中,資料處理不是由控制項來進行,而是由主機應用程式所實作。In local processing mode, data processing is not handled by the control but rather implemented by the hosting application. 但是,報表處理是由控制項本身所處理。However report processing is handled by the control itself. 在本機處理模式中,只能使用 PDF、Excel、Word 和 Image 轉譯延伸模組。In local processing mode, only the PDF, Excel, Word, and Image rendering extensions are available.

另請參閱See Also

將 Reporting Services 整合到應用程式 Integrating Reporting Services into Applications
使用 WebForms 報表檢視器控制項 Using the WebForms Report Viewer Control
使用 WinForms 報表檢視器控制項Using the WinForms Report Viewer Control