다음을 통해 공유


ReportingService2005.CreateFolder Method

Adds a folder to the report server database.

네임스페이스: Microsoft.WSSUX.ReportingServicesWebService.RSManagementService2005
어셈블리: ReportService2005 (in reportingservice2005.dll)

구문

‘선언
<SoapDocumentMethodAttribute("https://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices/CreateFolder", 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)> _
<SoapHeaderAttribute("ServerInfoHeaderValue", Direction:=SoapHeaderDirection.Out)> _
<SoapHeaderAttribute("BatchHeaderValue")> _
Public Sub CreateFolder ( _
    Folder As String, _
    Parent As String, _
    Properties As Property() _
)
[SoapDocumentMethodAttribute("https://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices/CreateFolder", 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)] 
[SoapHeaderAttribute("ServerInfoHeaderValue", Direction=SoapHeaderDirection.Out)] 
[SoapHeaderAttribute("BatchHeaderValue")] 
public void CreateFolder (
    string Folder,
    string Parent,
    Property[] Properties
)
[SoapDocumentMethodAttribute(L"https://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices/CreateFolder", 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)] 
[SoapHeaderAttribute(L"ServerInfoHeaderValue", Direction=SoapHeaderDirection::Out)] 
[SoapHeaderAttribute(L"BatchHeaderValue")] 
public:
void CreateFolder (
    String^ Folder, 
    String^ Parent, 
    array<Property^>^ Properties
)
/** @attribute SoapDocumentMethodAttribute("https://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices/CreateFolder", 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) */ 
/** @attribute SoapHeaderAttribute("ServerInfoHeaderValue", Direction=SoapHeaderDirection.Out) */ 
/** @attribute SoapHeaderAttribute("BatchHeaderValue") */ 
public void CreateFolder (
    String Folder, 
    String Parent, 
    Property[] Properties
)
SoapDocumentMethodAttribute("https://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices/CreateFolder", 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) 
SoapHeaderAttribute("ServerInfoHeaderValue", Direction=SoapHeaderDirection.Out) 
SoapHeaderAttribute("BatchHeaderValue") 
public function CreateFolder (
    Folder : String, 
    Parent : String, 
    Properties : Property[]
)

매개 변수

  • Folder
    The name of the new folder.
  • Parent
    The full path name of the parent folder to which to add the new folder.
  • Properties
    An array of Property objects that defines the property names and values to set for the folder.

주의

The length of the full path name for the new folder cannot exceed 260 characters; otherwise, a SOAP exception is thrown with the error code rsItemLengthExceeded.

Folder names cannot be null, consist of empty strings, 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.

If My Reports is enabled, a SOAP exception is thrown with the error code rsItemAlreadyExists if you attempt to create a folder named "My Reports" in the root folder of the report server database.

Adding a folder to the report server database modifies 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 코드 예제 컴파일 및 실행. The following code example uses the CreateFolder method to create a folder in the report server database:

Imports System
Imports System.Web.Services.Protocols

Class Sample
   Public Shared Sub Main()
      Dim rs As New ReportingService2005()
      rs.Credentials = System.Net.CredentialCache.DefaultCredentials

      ' Create a custom property for the folder.
      Dim newProp As New [Property]()
      newProp.Name = "Department"
      newProp.Value = "Finance"
      Dim props(0) As [Property]
      props(0) = newProp

      Dim folderName As String = "Budget"

      Try
         rs.CreateFolder(folderName, "/", props)
         Console.WriteLine("Folder created: {0}", folderName)

      Catch e As SoapException
         Console.WriteLine(e.Detail.InnerXml)
      End Try
   End Sub 'Main
End Class 'Sample
using System;
using System.Web.Services.Protocols;

class Sample
{
   public static void Main()
   {
      ReportingService rs = new ReportingService2005();
      rs.Credentials = System.Net.CredentialCache.DefaultCredentials;

      // Create a custom property for the folder.
      Property newProp = new Property();
      newProp.Name = "Department";
      newProp.Value = "Finance";
      Property[] props = new Property[1];
      props[0] = newProp;

      string folderName = "Budget";

      try
      {
         rs.CreateFolder(folderName, "/", props);
         Console.WriteLine("Folder created: {0}", folderName);
      }

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

스레드 보안

Any public static (Shared in Microsoft Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

플랫폼

개발 플랫폼

지원되는 플랫폼 목록은 SQL Server 2005 설치를 위한 하드웨어 및 소프트웨어 요구 사항을 참조하십시오.

대상 플랫폼

지원되는 플랫폼 목록은 SQL Server 2005 설치를 위한 하드웨어 및 소프트웨어 요구 사항을 참조하십시오.

참고 항목

참조

ReportingService2005 Class
ReportingService2005 Members
Microsoft.WSSUX.ReportingServicesWebService.RSManagementService2005 Namespace