ReportingService2010.MoveItem(String, String) Méthode
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Déplace et/ou renomme un objet. Cette méthode s’applique à tous les types d’objets.
public:
void MoveItem(System::String ^ ItemPath, System::String ^ Target);
[System.Web.Services.Protocols.SoapDocumentMethod("http://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer/MoveItem", 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 MoveItem(string ItemPath, string Target);
[<System.Web.Services.Protocols.SoapDocumentMethod("http://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer/MoveItem", 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.MoveItem : string * string -> unit
Public Sub MoveItem (ItemPath As String, Target As String)
Paramètres
- ItemPath
- String
L’URL entièrement qualifiée de l’élément incluant le nom du fichier et, en mode SharePoint, l’extension.
- Target
- String
La nouvelle URL entièrement qualifiée de l’objet, incluant le nom du fichier et son extension.
- Attributs
Exemples
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/" +
"ReportService2010.asmx";
rs.Credentials =
System.Net.CredentialCache.DefaultCredentials;
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";
try
{
rs.MoveItem(currentPath, targetPath);
}
catch (SoapException e)
{
Console.WriteLine(e.Detail.OuterXml);
}
}
}
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/" + _
"ReportService2010.asmx"
rs.Credentials = _
System.Net.CredentialCache.DefaultCredentials
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"
Try
rs.MoveItem(currentPath, targetPath)
Catch e As SoapException
Console.WriteLine(e.Detail.OuterXml)
End Try
End Sub
End Class
Remarques
Le tableau ci-dessous présente les informations sur l’en-tête et les autorisations concernant cette opération.
| Utilisation de l’en-tête SOAP | (En) TrustedUserHeaderValue (Dehors) ServerInfoHeaderValue |
| Mode natif : autorisations requises | Cela dépend du type d’objet : - Folder: UpdateProperties allumé Item ET CreateFolder allumé Target- Report: UpdateProperties allumé Item ET CreateReport allumé Target- Resource: UpdateProperties allumé Item ET CreateResource allumé Target- DataSource: UpdateProperties allumé Item ET CreateDatasource allumé Target- Model: UpdateProperties allumé Item ET CreateModel allumé Target |
| Permissions requises en mode SharePoint |
<xref:Microsoft.SharePoint.SPBasePermissions.EditListItems> on Item ET <xref:Microsoft.SharePoint.SPBasePermissions.AddListItems> sur le dossier parent dans Target (si le dossier parent de destination est différent) |
Si un élément hérite des politiques de sécurité de son parent, déplacer l’élément lui fait hériter des politiques de sécurité du dossier cible. Si un élément n’hérite pas des politiques de sécurité de son parent, déplacer l’élément ne provoque pas de changement de ses politiques de sécurité.
Si le chemin cible ne se trouve pas dans la même base de données serveur de rapports ou site SharePoint que l’élément donné, une rsInvalidDestination erreur est renvoyée.
Le déplacement ou le renommage des éléments dans une base de données serveur de rapports ou une bibliothèque bibliothèque SharePoint modifie les ModifiedBy propriétés et ModifiedDate de l’élément ainsi que les dossiers source et cible de l’élément.