ReportingService2005.MoveItem Method (String, String)
Applies To: SQL Server 2016 Preview
Moves or renames an item.
Namespace: ReportService2005
Assembly: ReportService2005 (in ReportService2005.dll)
Syntax
public void MoveItem(
string Item,
string Target
)
public:
void MoveItem(
String^ Item,
String^ Target
)
member MoveItem :
Item:string *
Target:string -> unit
Public Sub MoveItem (
Item As String,
Target As String
)
Parameters
Item
Type: System.StringThe full path name of the item.
Target
Type: System.StringThe new full path name of the item.
Remarks
The table below shows header and permissions information on this operation.
SOAP Headers |
(In) BatchHeaderValue (Out) ServerInfoHeaderValue |
Required Permissions |
Depends on the item type:
|
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.
When My Reports is enabled, you cannot move the /My Reports or /Users folders. An attempt to do so produces a SOAP exception with the error code rsInvalidMove.
Moving or renaming items in the report server database modifies the ModifiedBy and ModifiedDate properties of the item and the source and target folders of the item.
Examples
Legacy Code Example
To compile the following code example, you must reference the Reporting Services WSDL and import certain namespaces. For more information, see . The following example code moves the Employee Sales Summary report from the Samples folder to the root folder.Unable to find linked topic '317946aa-8e95-4f0b-8170-394c9d5e184e'.
Imports System
Imports System.Web.Services.Protocols
Class Sample
Public Shared Sub Main()
Dim rs As New ReportingService2005()
rs.Credentials = System.Net.CredentialCache.DefaultCredentials
Dim currentPath As String = "/SampleReports/Employee Sales Summary"
Dim targetPath As String = "/Employee Sales Summary"
Try
rs.MoveItem(currentPath, targetPath)
Catch e As SoapException
Console.WriteLine(e.Detail.OuterXml)
End Try
End Sub 'Main
End Class 'Sample
using System;
using System.Web.Services.Protocols;
class Sample
{
public static void Main()
{
ReportingService2005 rs = new ReportingService2005();
rs.Credentials = System.Net.CredentialCache.DefaultCredentials;
string currentPath = "/SampleReports/Employee Sales Summary";
string targetPath = "/Employee Sales Summary";
try
{
rs.MoveItem(currentPath, targetPath);
}
catch (SoapException e)
{
Console.WriteLine(e.Detail.OuterXml);
}
}
}
See Also
ReportingService2005 Class
ReportService2005 Namespace
Return to top