Share via


ReportingService2010.CreateLinkedItem メソッド

定義

新しいリンク アイテムをレポート サーバー データベースに追加します。

public:
 void CreateLinkedItem(System::String ^ ItemPath, System::String ^ Parent, System::String ^ Link, cli::array <ReportService2010::Property ^> ^ Properties);
[System.Web.Services.Protocols.SoapDocumentMethod("http://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer/CreateLinkedItem", 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 CreateLinkedItem (string ItemPath, string Parent, string Link, ReportService2010.Property[] Properties);
[<System.Web.Services.Protocols.SoapDocumentMethod("http://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer/CreateLinkedItem", 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.CreateLinkedItem : string * string * string * ReportService2010.Property[] -> unit
Public Sub CreateLinkedItem (ItemPath As String, Parent As String, Link As String, Properties As Property())

パラメーター

ItemPath
String

ディレクトリ パスを含む、新しいリンク アイテムのファイル名です。

Parent
String

新しいアイテムを追加する親フォルダーの完全修飾 URL です。

Link
String

アイテム定義に使用されるアイテムの完全修飾 URL です。

Properties
Property[]

リンク アイテムに設定するプロパティの名前と値を定義する Property オブジェクトの配列です。

属性

このコード例をコンパイルするには、Reporting Services の WSDL を参照し、特定の名前空間をインポートする必要があります。 詳細については、「 コード例のコンパイルと実行」を参照してください。 次のコード例では、リンク レポートを作成します。

Imports System  
Imports System.Web.Services.Protocols  

Class Sample  
   Public Shared Sub Main()  
      Dim rs As New ReportingService2010()  
      rs.Credentials = System.Net.CredentialCache.DefaultCredentials  

      Dim prop As New [Property]()  
      prop.Name = "Description"  
      prop.Value = "A new linked report"  
      Dim props(0) As [Property]  
      props(0) = prop  

      Try  
         rs.CreateLinkedItem("Employee Sales Report2", "/SampleReports", "/SampleReports/Employee Sales Summary", props)  

      Catch e As SoapException  
         Console.WriteLine(e.Detail.InnerXml.ToString())  
      End Try  
   End Sub 'Main  
End Class 'Sample  
using System;  
using System.Web.Services.Protocols;  

class Sample  
{  
   public static void Main()  
   {  
      ReportingService2010 rs = new ReportingService2010();  
      rs.Credentials = System.Net.CredentialCache.DefaultCredentials;  

      Property prop = new Property();  
      prop.Name = "Description";  
      prop.Value = "A new linked report";  
      Property[] props = new Property[1];  
      props[0] = prop;  

      try  
      {  
         rs.CreateLinkedItem("Employee Sales Report2", "/SampleReports",  
            "/SampleReports/Employee Sales Summary", props);  
      }  

      catch (SoapException e)  
      {  
         Console.WriteLine(e.Detail.InnerXml.ToString());   
      }  
   }  
}  

注釈

次の表に、この操作に関連するヘッダーおよび権限の情報を示します。

SOAP ヘッダーの使用方法 (In) TrustedUserHeaderValue

(Out) ServerInfoHeaderValue
ネイティブ モードで必要なアクセス許可 Parent に対する CreateReport、および ItemPath に対する ReadProperties
SharePoint モードで必要なアクセス許可 サポートされていません

パラメーターと パラメーターのParent長さは 260 文字を超えることはできません。それ以外の場合は、エラー コード rsItemLengthExceeded で SOAP 例外がスローLinkされます。

Parent パラメーターと Link パラメーターを NULL または空の文字列にすることはできません。また、予約文字 : ? ; @ & = + $ , \ * > < | . " を含めることもできません。 スラッシュ (/) は、フォルダーの完全なパス名内の各項目を区切るために使用することはできますが、フォルダー名の末尾には使用できません。

リンク アイテムには、標準カタログ アイテムと同じプロパティがありますが、リンク アイテム独自のアイテム定義はありません。 リンク アイテムは、別のリンク アイテムを参照することはできません。

リンク アイテムを作成するには、リンク アイテムが参照するアイテムの定義を読み取るための権限を持っている必要があります。ただし、リンク アイテムの実行には、この権限レベルは必要ありません。

CreateLinkedItem メソッドを使用すると、親フォルダーの ModifiedBy プロパティと ModifiedDate プロパティが変更されます。

適用対象