言語

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ヘッダーの使用 (イン) TrustedUserHeaderValue

(アウト) ServerInfoHeaderValue
ネイティブモードの必要権限 CreateReport オン・ Parent ・アンド・ ReadProperties オン ItemPath
SharePointモードの必要権限 サポートしていません

ParentおよびLinkパラメータの長さは260文字を超えてはなりません。そうでなければ、エラーコードrsItemLengthExceedを伴うSOAP例外がスローされます。

ParentおよびLinkパラメータはnullや空であってはならず、以下の予約文字を含むことはできません:: ? ; @ & = + $ , \ * > < | . "。 フォルダーのフルパス名の項目を区切るためにスラッシュ文字(/)を使うことはできますが、フォルダ名の最後には使えません

リンクされたアイテムは標準カタログアイテムと同じプロパティを持ちますが、独自のアイテム定義は含まれていません。 リンクされたアイテムは他のリンクアイテムを参照することはできません。

リンクされた項目の作成者は、そのリンクされた項目が参照する項目の定義を読む許可を得なければなりません。しかし、このレベルの許可はリンクされた項目を実行する際に必要ありません。

CreateLinkedItemメソッドを使うと親フォルダのModifiedByおよびModifiedDateプロパティが変更されます。

適用対象