啟用和停用 Reporting Services 的用戶端列印功能Enable and Disable Client-Side Printing for Reporting Services

MicrosoftMicrosoft ActiveX 控制項RSClientPrint,提供在瀏覽器中檢視報表的用戶端列印。The MicrosoftMicrosoft ActiveX control, RSClientPrint, provides client-side printing for reports viewed in a browser. 此控制項會顯示自訂列印對話方塊,其中支援與其他列印對話方塊一樣的一般功能。The control displays a custom print dialog box that supports features common to other print dialog boxes. 這些功能包括預覽列印、可指定要列印的特定頁面及範圍、頁面邊界和列印方向。The features include print preview, page selections for specifying specific pages and ranges, page margins, and orientation. 雖然依預設會啟用用戶端列印,但如果您不想提供此功能,也可以停用它。Although client-side printing is enabled by default, you can disable the feature to prevent it from being used.

注意

下載 ActiveX 控制項需要具有管理員權限。Downloading ActiveX controls requires administrator permissions.

下載 ActiveX 控制項Downloading the ActiveX Control

每一個想要使用列印功能的使用者,都必須下載並安裝提供用戶端列印功能的 ActiveX 控制項。Each user who wants to use the print feature must download and install the ActiveX control that provides client print functionality. 第一次使用者按一下印表機報表] 工具列的 [Microsoft ActiveX 控制項下載到電腦上的圖示。The first time a user clicks the Printer icon on the report toolbar, the Microsoft ActiveX control is downloaded to the computer. 下載此控制項之後,列印 對話方塊會顯示,每當使用者按一下印表機圖示。After the control is downloaded, the Print dialog box displays whenever the user clicks the Printer icon.

視瀏覽器設定而定,也許會提示使用者安裝此控制項、防止安裝此控制項,或在背景中無障礙地安裝此控制項。Depending on browser settings, the user may be prompted to install the control, be prevented from installing the control, or have the control install transparently in the background.

針對MicrosoftMicrosoft影響 ActiveX 控制項下載及安裝的設定會指定 Internet Explorer 中,透過ActiveX 控制項與外掛程式中的節點安全性設定頁面Web 內容區域。For MicrosoftMicrosoft Internet Explorer, settings that affect ActiveX control download and installation are specified through the ActiveX controls and plug-ins node in the Security Settings page for the Web content zone. 下列設定將根據網際網路區域安全性喜好設定,決定使用者是否可以下載及執行列印控制項:The following settings determine whether users can download and run the print control, based on Web zone security preferences:

  • 下載簽署的 ActiveX 控制項。Download signed ActiveX controls.

  • 為標示為安全可供撰寫指令碼的 ActiveX 控制項撰寫指令碼。Script ActiveX controls marked safe for scripting.

  • 執行 ActiveX 控制項和外掛程式。Run ActiveX controls and plug-ins.

想要使用的使用者RSClientPrint執行用戶端列印必須啟用下列:Users who want to use RSClientPrint to perform client-side printing must enable the following:

  • 下載簽署的 ActiveX 控制項指令碼的 ActiveX 控制項標示為安全的指令碼才能進行安裝。Download signed ActiveX controls and Script ActiveX control marked safe for scripting for installation purposes.

  • 執行 ActiveX 控制項與外掛程式才能進行列印作業。Run ActiveX controls and plug-ins for ongoing print operations.

RSClientPrint ActiveX 控制項已經簽署,表示它包含從有效的數位憑證MicrosoftMicrosoftThe RSClientPrint ActiveX control is signed, meaning it contains a valid digital certificate from MicrosoftMicrosoft.

啟用及停用用戶端列印Enabling and Disabling Client-Side Printing

報表伺服器管理員可以選擇停用列印功能,藉由設定報表伺服器系統屬性EnableClientPrintingfalseReport server administrators have the option of disabling the print feature by setting the report server system property EnableClientPrinting to false. 這樣會停用由該伺服器管理的所有報表的用戶端列印功能。This will disable client-side printing for all reports managed by that server. 根據預設, EnableClientPrinting設定為trueBy default, EnableClientPrinting is set to true. 您可以採用下列方式來停用用戶端列印:You can disable client-side printing in the following ways:

  • 針對 原生模式報表伺服器For a Native mode report server:

    1. 使用系統管理權限來啟動 Management StudioManagement StudioStart Management StudioManagement Studio with administrative privileges.

    2. Management StudioManagement Studio中,連接到報表伺服器執行個體。Connect to a report server instance in Management StudioManagement Studio.

    3. 以滑鼠右鍵按一下報表伺服器節點,然後按一下 [屬性] 。Right-click the report server node, and then click Properties. 如果 [屬性] 選項已停用,請確認您已使用系統管理權限來啟動 Management StudioManagement StudioIf the Properties option is disabled, verify you started Management StudioManagement Studio with administrative privileges.

    4. 選取 啟用 ActiveX 用戶端列印控制項的下載Select Enable download for the ActiveX client print control.

    5. 按一下 [確定] 。Click OK.

  • 針對 SharePoint 模式報表伺服器For a SharePoint mode report server:

    1. 在 SharePoint 管理中心內,按一下 [應用程式管理]In SharePoint Central Administration, click Application Management.

    2. 按一下 [管理服務應用程式]Click Manage service applications.

    3. 按一下 Reporting ServicesReporting Services 服務應用程式的名稱,然後按一下 SharePoint 功能區中的 [管理]Click the name of your Reporting ServicesReporting Services service application, and then click Manage in the SharePoint ribbon.

    4. 按一下 [系統設定]Click System Settings.

    5. 選取 [啟用用戶端列印]Select Enable Client Printing. [啟用用戶端列印] 選項位於靠近頁面底部的位置。The Enable Client Printing option is near the bottom of the page.

    6. 按一下 [確定] 。Click OK.

  • 撰寫指令碼或程式碼以設定報表伺服器系統屬性EnableClientPrintingfalse.Write script or code to set the report server system property EnableClientPrinting to false.

下列範例指令碼說明停用用戶端列印功能的方法之一。The following sample script illustrates one approach for disabling client-side printing. 編譯後執行下列 MicrosoftMicrosoft Visual BasicVisual Basic 程式碼,將 EnableClientPrinting 屬性設定為 [False]Compile and then run the following MicrosoftMicrosoft Visual BasicVisual Basic code to set the EnableClientPrinting property to False. 執行程式碼之後,請重新啟動 IIS。After you run the code, restart IIS.

範例指令碼Sample Script

Imports System  
Imports System.Web.Services.Protocols  
Class Sample  
   Public Shared Sub Main()  
Dim rs As New ReportingService()  
      rs.Credentials = System.Net.CredentialCache.DefaultCredentials  
        Dim props(0) As [Property]  
        Dim setProp As New [Property]  
        setProp.Name = "EnableClientPrinting"  
        setProp.Value = "False"   
        props(0) = setProp  
        Try  
            rs.SetSystemProperties(props)  
        Catch ex As System.Web.Services.Protocols.SoapException  
            Console.Write(ex.Detail.InnerXml)  
        Catch e as Exception  
            Console.Write(e.Message)  
        End Try  
    End Sub 'Main  
End Class 'Sample