ReportingService2005.MoveItem(String, String) メソッド
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
アイテムを移動または名前変更する。
public:
void MoveItem(System::String ^ Item, System::String ^ Target);
public void MoveItem(string Item, string Target);
member this.MoveItem : string * string -> unit
Public Sub MoveItem (Item As String, Target As String)
パラメーター
- Item
- String
アイテムのフルパス名。
- Target
- String
アイテムの新しいフルパス名。
例
以下のコード例をコンパイルするには、Reporting ServicesのWSDLを参照し、特定の名前空間をインポートする必要があります。 詳細については 、「コード例のコンパイルと実行」をご覧ください。 以下の例コードは、従業員売上要約レポートをSamplesフォルダからルートフォルダに移動させます。
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);
}
}
}
注釈
以下の表は、この操作のヘッダーおよび権限情報を示しています。
| SOAPヘッダー | (イン) BatchHeaderValue (アウト) ServerInfoHeaderValue |
| 必要なアクセス許可 | アイテムの種類によります: - Folder
UpdateProperties on Item そして CreateFolder onTarget- Report
UpdateProperties on Item そして CreateReport onTarget- Resource
UpdateProperties on Item そして CreateResource onTarget- DataSource
UpdateProperties on Item そして CreateDatasource onTarget- Model
UpdateProperties on Item そして CreateModel onTarget |
アイテムが親からセキュリティポリシーを継承した場合、そのアイテムを移動するとターゲットフォルダーのセキュリティポリシーが継承されます。 もしアイテムが親からセキュリティポリシーを受け継がない場合、アイテムを移動してもセキュリティポリシーは変更されません。
「マイレポート」が有効になっていると、/My Reportsや/Usersフォルダは移動できません。 これを試みると、エラーコード rsInvalidMoveのSOAP例外が発生します。
レポートサーバーデータベース内のアイテムの移動や名前変更は、アイテムの ModifiedBy および ModifiedDate プロパティ、そしてソースフォルダーとターゲットフォルダーを変更します。