ReportingService2010.CreateLinkedItem(String, String, String, Property[]) ReportingService2010.CreateLinkedItem(String, String, String, Property[]) ReportingService2010.CreateLinkedItem(String, String, String, Property[]) Method


将新的链接项添加到报表服务器数据库。 Adds a new linked item to the report server database.

 void CreateLinkedItem(System::String ^ ItemPath, System::String ^ Parent, System::String ^ Link, cli::array <ReportService2010::Property ^> ^ Properties);
[System.Web.Services.Protocols.SoapDocumentMethod("", ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped, RequestNamespace="", ResponseNamespace="", Use=System.Web.Services.Description.SoapBindingUse.Literal)]
[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);
Public Sub CreateLinkedItem (ItemPath As String, Parent As String, Link As String, Properties As Property())
String String String

包括文件名的新链接项的文件名。 The file name of the new linked item including the file name.

String String String

要向其中添加新项的父文件夹的完全限定 URL。 The fully qualified URL of the parent folder to which to add the new item.

String String String

将要用于项定义的项的完全限定 URL。 The fully qualified URL of the item that will be used for the item definition.


一个 Property 对象的数组,该数组定义要为链接项设置的属性名和属性值。 An array of Property objects that defines the property names and values to set for the linked item.


若要编译此代码示例,必须引用 Reporting 服务 WSDL,并导入某些命名空间。To compile this code example, you must reference the Reporting Services WSDL and import certain namespaces. 有关详细信息,请参阅编译和运行代码示例For more information, see Compiling and Running Code Examples. 下面的代码示例创建链接的报表:The following code example creates a linked report:

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  

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

      Catch e As SoapException  
      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;  

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

      catch (SoapException e)  


下表显示了有关此操作的标头和权限信息。The table below shows header and permissions information on this operation.

SOAP 标头使用情况SOAP Header Usage (In) TrustedUserHeaderValue(In) TrustedUserHeaderValue

(Out) ServerInfoHeaderValue(Out) ServerInfoHeaderValue
纯模式所需的权限Native Mode Required Permissions CreateReportParentANDReadPropertiesItemPathCreateReport on Parent AND ReadProperties on ItemPath
SharePoint 模式所需的权限SharePoint Mode Required Permissions 不支持Not supported

长度ParentLink参数不能超过 260 个字符; 否则,将 SOAP 异常引发,错误代码rsItemLengthExceededThe length of the Parent and Link parameters cannot exceed 260 characters; otherwise, a SOAP exception is thrown with the error code rsItemLengthExceeded.

ParentLink参数不能为 null 或为空或包含下列保留的字符: : ? ; @ & = + $ , \ * > < | . "The Parent and Link parameters cannot be null or empty or contain the following reserved characters: : ? ; @ & = + $ , \ * > < | . ". 你可以使用正斜杠字符 (/) 分隔的文件夹的完整路径名称中的项,但不是能在文件夹名称末尾使用它You can use the forward slash character (/) to separate items in the full path name of the folder, but you cannot use it at the end of the folder name

链接的项具有相同的属性为标准的目录项,但它不包含其自己的项定义。A linked item has the same properties as a standard catalog item, but it does not contain its own item definition. 链接的项不能引用另一个链接的项。A linked item cannot reference another linked item.

链接的项的创建者必须有权读取的项引用链接的项; 定义但是,此级别的权限不需要运行某个链接的项。The creator of a linked item must have permission to read the definition of the item that the linked item references; however, this level of permission is not required to run a linked item.

使用CreateLinkedItem方法更改ModifiedByModifiedDate父文件夹的属性。Using the CreateLinkedItem method changes the ModifiedBy and ModifiedDate properties of the parent folder.