ReportingService2005.CreateLinkedReport(String, String, String, Property[]) Method

Definition

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

public:
 void CreateLinkedReport(System::String ^ Report, System::String ^ Parent, System::String ^ Link, cli::array <ReportService2005::Property ^> ^ Properties);
public void CreateLinkedReport (string Report, string Parent, string Link, ReportService2005.Property[] Properties);
member this.CreateLinkedReport : string * string * string * ReportService2005.Property[] -> unit
Public Sub CreateLinkedReport (Report As String, Parent As String, Link As String, Properties As Property())

Parameters

Report
String

新的链接报表的名称。The name of the new linked report.

Parent
String

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

Link
String

将要作为报表定义的报表的完全限定 URL。The fully qualified URL of the report that will be used for the report definition.

Properties
Property[]

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

Examples

若要编译此代码示例,必须引用 Reporting Services 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 ReportingService2005()  
      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.CreateLinkedReport("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()  
   {  
      ReportingService2005 rs = new ReportingService2005();  
      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.CreateLinkedReport("Employee Sales Report2", "/SampleReports",  
            "/SampleReports/Employee Sales Summary", props);  
      }  

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

Remarks

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

SOAP 标头SOAP Headers (In) BatchHeaderValue(In) BatchHeaderValue

(Out) ServerInfoHeaderValue(Out) ServerInfoHeaderValue
所需的权限Required Permissions CreateReport 打开 ParentReadProperties 打开 ReportCreateReport on Parent AND ReadProperties on Report

和参数的长度 Parent Link 不能超过260个字符; 否则,将引发带有错误代码 rsItemLengthExceeded 的 SOAP 异常。The 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 report has the same properties as a standard report, but it does not contain its own report definition. 链接报表不能引用另一个链接报表。A linked report cannot reference another linked report.

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

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

Applies to