ReportingService2005.CreateLinkedReport 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
向报告服务器数据库添加一个新的关联报告。
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())
参数
- Report
- String
新链接报告的名称。
- Parent
- String
添加新报告的父文件夹的完全限定URL。
- Link
- String
报告定义将被完全限定的报告URL。
示例
要编译此代码示例,您必须引用 Reporting Services WSDL 并导入某些命名空间。 更多信息请参见编 译与运行代码示例。 以下代码示例创建了一个链接报告:
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());
}
}
}
注解
下表显示了该操作的头部和权限信息。
| SOAP 头部 | (在) BatchHeaderValue (出局) ServerInfoHeaderValue |
| 所需的权限 |
CreateReport一直往ParentReadProperties下Report |
和参数的长度Parent不得超过260个字符;否则,会抛出带有错误代码rsItemLengthExceed的SOAP异常。Link
Parent和Link参数不能为空或空,也不能包含以下保留字符: : ? ; @ & = + $ , \ * > < | . "。 你可以用斜杠字符(/)分隔文件夹完整路径名称中的项目,但不能在文件夹名称末尾使用。
关联报告具有与标准报告相同的属性,但不包含自己的报告定义。 关联报告不能引用另一个关联报告。
链接报告的创建者必须获得阅读该链接报告所引用报告定义的权限;然而,运行关联报告并不需要这种权限级别。
使用该 CreateLinkedReport 方法会更改 ModifiedBy 父文件夹的 和 ModifiedDate 属性。