語言

ReportingService2010.DeleteItem(String) 方法

定義

從報表伺服器資料庫或 SharePoint 文件庫 刪除指定的項目。 此方法適用於所有物品類型。

public:
 void DeleteItem(System::String ^ ItemPath);
[System.Web.Services.Protocols.SoapDocumentMethod("http://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer/DeleteItem", ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped, RequestNamespace="http://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer", ResponseNamespace="http://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer", Use=System.Web.Services.Description.SoapBindingUse.Literal)]
[System.Web.Services.Protocols.SoapHeader("TrustedUserHeaderValue")]
[System.Web.Services.Protocols.SoapHeader("ServerInfoHeaderValue", Direction=System.Web.Services.Protocols.SoapHeaderDirection.Out)]
public void DeleteItem(string ItemPath);
[<System.Web.Services.Protocols.SoapDocumentMethod("http://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer/DeleteItem", ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped, RequestNamespace="http://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer", ResponseNamespace="http://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer", Use=System.Web.Services.Description.SoapBindingUse.Literal)>]
[<System.Web.Services.Protocols.SoapHeader("TrustedUserHeaderValue")>]
[<System.Web.Services.Protocols.SoapHeader("ServerInfoHeaderValue", Direction=System.Web.Services.Protocols.SoapHeaderDirection.Out)>]
member this.DeleteItem : string -> unit
Public Sub DeleteItem (ItemPath As String)

參數

ItemPath
String

項目的完整限定網址,包括檔名,以及在 SharePoint 模式下的副檔名。

屬性

備註

下表顯示此操作的標頭與權限資訊。

SOAP 標頭的使用 (在) TrustedUserHeaderValue

(出局) ServerInfoHeaderValue
原生模式所需權限 這要看物品類型。

- Folder: Delete
- Report, LinkedReport, : DataSetDelete
- Resource, : ComponentDelete
- DataSource: Delete
- Model: Delete

如果該項目包含任何子項目,你也必須對每個子項目取得相應 Delete 的權限。
SharePoint 模式 必要權限 <xref:Microsoft.SharePoint.SPBasePermissions.DeleteListItems>

參數長度 ItemPath 不得超過 260 個字元;否則會拋出帶有錯誤碼 rsItemLengthExceed 的 SOAP 例外。

ItemPath參數不能為空或空,或包含以下保留字元: : ? ; @ & = + $ , \ * > < | . "。 你可以用斜線字元(/)來分隔資料夾完整路徑名稱中的項目,但不能用在資料夾名稱的末尾。

此方法不僅會從報表伺服器資料庫 SharePoint 文件庫 中刪除指定項目,還會刪除與報表項目相關的訂閱、排程和快照等額外項目。

從報表伺服器資料庫或 SharePoint 文件庫 刪除項目會ModifiedBy修改父項目的屬性ModifiedDate。

除了 Site. 如果要列出項目類型,請使用這個 ListItemTypes 方法。

適用於