ReportingService2005.CreateFolder 메서드

Adds a folder to the report server database.

네임스페이스:  ReportService2005
어셈블리:  ReportService2005(ReportService2005.dll)


Public Sub CreateFolder ( _
    Folder As String, _
    Parent As String, _
    Properties As Property() _
‘사용 방법
Dim instance As ReportingService2005 
Dim Folder As String 
Dim Parent As String 
Dim Properties As Property()

instance.CreateFolder(Folder, Parent, _
public void CreateFolder(
    string Folder,
    string Parent,
    Property[] Properties
void CreateFolder(
    String^ Folder, 
    String^ Parent, 
    array<Property^>^ Properties
member CreateFolder : 
        Folder:string * 
        Parent:string * 
        Properties:Property[] -> unit
public function CreateFolder(
    Folder : String, 
    Parent : String, 
    Properties : Property[]

매개 변수

  • Parent
    유형: System.String
    The full path name of the parent folder to which to add the new folder.


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

SOAP Headers

(In) BatchHeaderValue

(Out) ServerInfoHeaderValue

Required Permissions


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 rsItemPathLengthExceeded.

Folder names must be less than 128 characters long. The 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 Compiling and Running Code Examples. 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"

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

      Catch e As SoapException
      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";

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

      catch(SoapException e)

참고 항목


ReportingService2005 클래스

ReportService2005 네임스페이스