ReportingService2010.MoveItem(String, String) ReportingService2010.MoveItem(String, String) ReportingService2010.MoveItem(String, String) Method


Moves and/or renames an item. This method applies to all item types.

 void MoveItem(System::String ^ ItemPath, System::String ^ Target);
[System.Web.Services.Protocols.SoapDocumentMethod("", ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped, RequestNamespace="", ResponseNamespace="", Use=System.Web.Services.Description.SoapBindingUse.Literal)]
[System.Web.Services.Protocols.SoapHeader("ServerInfoHeaderValue", Direction=System.Web.Services.Protocols.SoapHeaderDirection.Out)]
public void MoveItem (string ItemPath, string Target);
Public Sub MoveItem (ItemPath As String, Target As String)
String String String

The fully qualified URL of the item including the file name and, in SharePoint mode, the extension.

String String String

The new fully qualified URL of the item including the file name and extension.


using System;  
using System.Collections.Generic;  
using System.IO;  
using System.Text;  
using System.Web;  
using System.Web.Services;  
using System.Web.Services.Protocols;  

class Sample  
    static void Main(string[] args)  
        ReportingService2010 rs = new ReportingService2010();  
        rs.Url = "http://<Server Name>/_vti_bin/ReportServer/" +  
        rs.Credentials =   

        string currentPath = "http://<Server Name>/Docs/Documents" +  
            "/Data Sources/Sales Order Detail.rdl";  
        string targetPath = "http://<Server Name>/Docs/Documents/" +  
            "AdventureWorks Sample Reports/Sales Order Detail.rdl";  

            rs.MoveItem(currentPath, targetPath);  

        catch (SoapException e)  
Imports System  
Imports System.IO  
Imports System.Text  
Imports System.Web.Services  
Imports System.Web.Services.Protocols  

Class Sample  

    Public Shared Sub Main()  

        Dim rs As New ReportingService2010()  
        rs.Url = "http://<Server Name>/_vti_bin/ReportServer/" + _  
        rs.Credentials = _  

        Dim currentPath As String = "http://<Server Name>/Docs/" + _  
            "Documents/AdventureWorks Sample Reports/Sales Order Detail.rdl"  
        Dim targetPath As String = "http://<Server Name>/Docs/" + _  
            "Documents/Data Sources/Sales Order Detail.rdl"  

            rs.MoveItem(currentPath, targetPath)  

        Catch e As SoapException  
        End Try  

    End Sub  

End Class  


The table below shows header and permissions information on this operation.

SOAP Header Usage (In) TrustedUserHeaderValue

(Out) ServerInfoHeaderValue
Native Mode Required Permissions Depends on the item type:

- Folder: UpdateProperties on Item AND CreateFolder on Target
- Report: UpdateProperties on Item AND CreateReport on Target
- Resource: UpdateProperties on Item AND CreateResource on Target
- DataSource: UpdateProperties on Item AND CreateDatasource on Target
- Model: UpdateProperties on Item AND CreateModel on Target
SharePoint Mode Required Permissions EditListItems on Item AND AddListItems on the parent folder in Target (if the target parent folder is different)

If an item inherits security policies from its parent, moving the item causes it to inherit the security policies of the target folder. If an item does not inherit security policies from its parent, moving the item does not cause its security policies to change.

If the target path is not in the same report server database or SharePoint site as the given item, an rsInvalidDestination error is returned.

Moving or renaming items in a report server database or SharePoint library modifies the ModifiedBy and ModifiedDate properties of the item and the source and target folders of the item.

Applies to