Freigeben über


CreateLinkedReport-Methode

Fügt der Berichtsserver-Datenbank einen neuen verknüpften Bericht hinzu.

Namespace:  ReportService2005
Assembly:  ReportService2005 (in ReportService2005.dll)

Syntax

'Declaration
<SoapHeaderAttribute("ServerInfoHeaderValue", Direction := SoapHeaderDirection.Out)> _
<SoapHeaderAttribute("BatchHeaderValue")> _
<SoapDocumentMethodAttribute("https://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices/CreateLinkedReport", RequestNamespace := "https://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices",  _
    ResponseNamespace := "https://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices",  _
    Use := SoapBindingUse.Literal, ParameterStyle := SoapParameterStyle.Wrapped)> _
Public Sub CreateLinkedReport ( _
    Report As String, _
    Parent As String, _
    Link As String, _
    Properties As Property() _
)
'Usage
Dim instance As ReportingService2005
Dim Report As String
Dim Parent As String
Dim Link As String
Dim Properties As Property()

instance.CreateLinkedReport(Report, Parent, _
    Link, Properties)
[SoapHeaderAttribute("ServerInfoHeaderValue", Direction = SoapHeaderDirection.Out)]
[SoapHeaderAttribute("BatchHeaderValue")]
[SoapDocumentMethodAttribute("https://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices/CreateLinkedReport", RequestNamespace = "https://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices", 
    ResponseNamespace = "https://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices", 
    Use = SoapBindingUse.Literal, ParameterStyle = SoapParameterStyle.Wrapped)]
public void CreateLinkedReport(
    string Report,
    string Parent,
    string Link,
    Property[] Properties
)
[SoapHeaderAttribute(L"ServerInfoHeaderValue", Direction = SoapHeaderDirection::Out)]
[SoapHeaderAttribute(L"BatchHeaderValue")]
[SoapDocumentMethodAttribute(L"https://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices/CreateLinkedReport", RequestNamespace = L"https://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices", 
    ResponseNamespace = L"https://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices", 
    Use = SoapBindingUse::Literal, ParameterStyle = SoapParameterStyle::Wrapped)]
public:
void CreateLinkedReport(
    String^ Report, 
    String^ Parent, 
    String^ Link, 
    array<Property^>^ Properties
)
[<SoapHeaderAttribute("ServerInfoHeaderValue", Direction = SoapHeaderDirection.Out)>]
[<SoapHeaderAttribute("BatchHeaderValue")>]
[<SoapDocumentMethodAttribute("https://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices/CreateLinkedReport", RequestNamespace = "https://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices", 
    ResponseNamespace = "https://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices", 
    Use = SoapBindingUse.Literal, ParameterStyle = SoapParameterStyle.Wrapped)>]
member CreateLinkedReport : 
        Report:string * 
        Parent:string * 
        Link:string * 
        Properties:Property[] -> unit 
public function CreateLinkedReport(
    Report : String, 
    Parent : String, 
    Link : String, 
    Properties : Property[]
)

Parameter

  • Parent
    Typ: System. . :: . .String
    Die vollqualifizierte URL des übergeordneten Ordners, dem der neue Bericht hinzugefügt werden soll.
  • Link
    Typ: System. . :: . .String
    Die vollqualifizierte URL des Berichts, der für die Berichtsdefinition verwendet wird.
  • Properties
    Typ: array<ReportService2005. . :: . .Property> [] () [] []
    Ein Array von Property-Objekten, das die Eigenschaftennamen und die Werte definiert, die für den verknüpften Bericht festgelegt werden sollen.

Hinweise

The table below shows header and permissions information on this operation.

SOAP Headers

(In) BatchHeaderValue

(Out) ServerInfoHeaderValue

Required Permissions

CreateReport on Parent AND ReadProperties on Report

The length of the Parent and Link parameters cannot exceed 260 characters; otherwise, a SOAP exception is thrown with the error code rsItemLengthExceeded.

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.

Using the CreateLinkedReport method changes the ModifiedBy and ModifiedDate properties of the parent folder.

Beispiele

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()); 
      }
   }
}