DeleteItem 方法
從報表伺服器資料庫或 SharePoint 文件庫中刪除指定的項目。這個方法會套用到所有項目類型。
命名空間: ReportService2010
組件: ReportService2010 (在 ReportService2010.dll 中)
語法
'宣告
<SoapHeaderAttribute("TrustedUserHeaderValue")> _
<SoapDocumentMethodAttribute("https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer/DeleteItem", RequestNamespace := "https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer", _
ResponseNamespace := "https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer", _
Use := SoapBindingUse.Literal, ParameterStyle := SoapParameterStyle.Wrapped)> _
<SoapHeaderAttribute("ServerInfoHeaderValue", Direction := SoapHeaderDirection.Out)> _
Public Sub DeleteItem ( _
ItemPath As String _
)
'用途
Dim instance As ReportingService2010
Dim ItemPath As String
instance.DeleteItem(ItemPath)
[SoapHeaderAttribute("TrustedUserHeaderValue")]
[SoapDocumentMethodAttribute("https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer/DeleteItem", RequestNamespace = "https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer",
ResponseNamespace = "https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer",
Use = SoapBindingUse.Literal, ParameterStyle = SoapParameterStyle.Wrapped)]
[SoapHeaderAttribute("ServerInfoHeaderValue", Direction = SoapHeaderDirection.Out)]
public void DeleteItem(
string ItemPath
)
[SoapHeaderAttribute(L"TrustedUserHeaderValue")]
[SoapDocumentMethodAttribute(L"https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer/DeleteItem", RequestNamespace = L"https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer",
ResponseNamespace = L"https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer",
Use = SoapBindingUse::Literal, ParameterStyle = SoapParameterStyle::Wrapped)]
[SoapHeaderAttribute(L"ServerInfoHeaderValue", Direction = SoapHeaderDirection::Out)]
public:
void DeleteItem(
String^ ItemPath
)
[<SoapHeaderAttribute("TrustedUserHeaderValue")>]
[<SoapDocumentMethodAttribute("https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer/DeleteItem", RequestNamespace = "https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer",
ResponseNamespace = "https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer",
Use = SoapBindingUse.Literal, ParameterStyle = SoapParameterStyle.Wrapped)>]
[<SoapHeaderAttribute("ServerInfoHeaderValue", Direction = SoapHeaderDirection.Out)>]
member DeleteItem :
ItemPath:string -> unit
public function DeleteItem(
ItemPath : String
)
參數
- ItemPath
型別:System. . :: . .String
項目的完整 URL,包括檔案名稱以及 SharePoint 模式中的延伸模組。
備註
The table below shows header and permissions information on this operation.
SOAP Header Usage |
(Out) ServerInfoHeaderValue |
Native Mode Required Permissions |
Depends on the item type.
If the item contains any child items, you must also have the respective Delete permission for each child item. |
SharePoint Mode Required Permissions |
DeleteListItems()()()() |
The length of the ItemPath parameter cannot exceed 260 characters; otherwise, a SOAP exception is thrown with the error code rsItemLengthExceeded.
The ItemPath parameter cannot be null or empty or contain the following reserved characters: : ? ; @ & = + $ , \ * > < | . ". You can use the forward slash character (/) to separate items in the full path name of the folder, but you cannot use it at the end of the folder name.
This method not only deletes the specified item from the report server database SharePoint library, it also deletes additional items, such as the subscriptions, schedules, and snapshots that are associated with the report item.
Deleting an item from a report server database or SharePoint library modifies the ModifiedBy and ModifiedDate properties of the parent item.
All catalog item types can be deleted except for a Site. For a list of item types, use the ListItemTypes method.