CreateLinkedItem 메서드
링크된 새 항목을 보고서 서버 데이터베이스에 추가합니다.
네임스페이스: ReportService2010
어셈블리: ReportService2010(ReportService2010.dll)
구문
‘선언
<SoapDocumentMethodAttribute("https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer/CreateLinkedItem", RequestNamespace := "https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer", _
ResponseNamespace := "https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer", _
Use := SoapBindingUse.Literal, ParameterStyle := SoapParameterStyle.Wrapped)> _
<SoapHeaderAttribute("TrustedUserHeaderValue")> _
<SoapHeaderAttribute("ServerInfoHeaderValue", Direction := SoapHeaderDirection.Out)> _
Public Sub CreateLinkedItem ( _
ItemPath As String, _
Parent As String, _
Link As String, _
Properties As Property() _
)
‘사용 방법
Dim instance As ReportingService2010
Dim ItemPath As String
Dim Parent As String
Dim Link As String
Dim Properties As Property()
instance.CreateLinkedItem(ItemPath, Parent, _
Link, Properties)
[SoapDocumentMethodAttribute("https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer/CreateLinkedItem", RequestNamespace = "https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer",
ResponseNamespace = "https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer",
Use = SoapBindingUse.Literal, ParameterStyle = SoapParameterStyle.Wrapped)]
[SoapHeaderAttribute("TrustedUserHeaderValue")]
[SoapHeaderAttribute("ServerInfoHeaderValue", Direction = SoapHeaderDirection.Out)]
public void CreateLinkedItem(
string ItemPath,
string Parent,
string Link,
Property[] Properties
)
[SoapDocumentMethodAttribute(L"https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer/CreateLinkedItem", RequestNamespace = L"https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer",
ResponseNamespace = L"https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer",
Use = SoapBindingUse::Literal, ParameterStyle = SoapParameterStyle::Wrapped)]
[SoapHeaderAttribute(L"TrustedUserHeaderValue")]
[SoapHeaderAttribute(L"ServerInfoHeaderValue", Direction = SoapHeaderDirection::Out)]
public:
void CreateLinkedItem(
String^ ItemPath,
String^ Parent,
String^ Link,
array<Property^>^ Properties
)
[<SoapDocumentMethodAttribute("https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer/CreateLinkedItem", RequestNamespace = "https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer",
ResponseNamespace = "https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer",
Use = SoapBindingUse.Literal, ParameterStyle = SoapParameterStyle.Wrapped)>]
[<SoapHeaderAttribute("TrustedUserHeaderValue")>]
[<SoapHeaderAttribute("ServerInfoHeaderValue", Direction = SoapHeaderDirection.Out)>]
member CreateLinkedItem :
ItemPath:string *
Parent:string *
Link:string *
Properties:Property[] -> unit
public function CreateLinkedItem(
ItemPath : String,
Parent : String,
Link : String,
Properties : Property[]
)
매개 변수
- ItemPath
유형: System. . :: . .String
파일 이름을 포함하는 새로운 링크된 항목의 파일 이름입니다.
- Parent
유형: System. . :: . .String
새 항목을 추가할 부모 폴더의 정규화된 URL입니다.
- Link
유형: System. . :: . .String
항목 정의에 사용할 항목의 정규화된 URL입니다.
- Properties
유형: array<ReportService2010. . :: . .Property> [] () [] []
링크된 항목에 대해 설정할 속성 이름과 값을 정의하는 Property 개체의 배열입니다.
주의
The table below shows header and permissions information on this operation.
SOAP Header Usage |
(Out) ServerInfoHeaderValue |
Native Mode Required Permissions |
CreateReport on Parent AND ReadProperties on ItemPath |
SharePoint Mode Required Permissions |
Not supported |
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 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.
Using the CreateLinkedItem method changes the ModifiedBy and ModifiedDate properties of the parent folder.
예
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
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());
}
}
}