ReportingService2006.CreateFolder Method
Adds a folder to a SharePoint library.
네임스페이스: ReportService2006
어셈블리: ReportService2006 (in reportservice2006.dll)
구문
‘선언
Public Function CreateFolder ( _
Folder As String, _
Parent As String _
) As CatalogItem
public CatalogItem CreateFolder (
string Folder,
string Parent
)
public:
CatalogItem^ CreateFolder (
String^ Folder,
String^ Parent
)
public CatalogItem CreateFolder (
String Folder,
String Parent
)
public function CreateFolder (
Folder : String,
Parent : String
) : CatalogItem
매개 변수
- Folder
The name of the new folder.
- Parent
The fully qualified URL for the parent folder or site that will contain the new folder.
반환 값
A CatalogItem object for the newly created 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: : ? @ & = + $ , \ * > < | . ".
Adding a folder to a SharePoint library modifies the ModifiedBy and ModifiedDate properties of the parent folder.
예
using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
using System.Web;
using System.Web.Services;
using System.Web.Services.Protocols;
class Sample
{
static void Main(string[] args)
{
ReportingService2006 rs = new ReportingService2006();
rs.Url = "http://<Server Name>" +
"/_vti_bin/ReportServer/ReportService2006.asmx";
rs.Credentials =
System.Net.CredentialCache.DefaultCredentials;
string folderName = "Budget";
string parent = "http://<Server Name>/Docs/Documents/";
try
{
rs.CreateFolder(folderName, parent);
Console.WriteLine("Folder created: {0}", folderName);
}
catch (SoapException e)
{
Console.WriteLine(e.Detail.InnerXml);
}
}
}
Imports System
Imports System.Web.Services
Imports System.Web.Services.Protocols
Class Sample
Public Shared Sub Main()
Dim rs As New ReportingService2006()
rs.Url = "http://<Server Name>" + _
"/_vti_bin/ReportServer/ReportService2006.asmx"
rs.Credentials = _
System.Net.CredentialCache.DefaultCredentials
Dim folderName As String = "Budget"
Dim parentPath As String = _
"http://<Server Name>/Docs/Documents/"
Try
rs.CreateFolder(folderName, parentPath)
Console.WriteLine("Folder created: {0}", folderName)
Catch e As SoapException
Console.WriteLine(e.Detail.InnerXml)
End Try
End Sub
End Class
스레드 보안
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 설치를 위한 하드웨어 및 소프트웨어 요구 사항을 참조하십시오.
대상 플랫폼
Windows 98, Windows 2000, Windows 2000 Server, Windows CE, Windows Server 2008, Windows 98 Second Edition, Pocket PC, Smart Phone, Windows Server 2003, Windows XP Professional with Service Pack 2 (SP2), Windows 2000 Professional, Windows 2000 Advanced Server, Windows XP Home Edition, 지원되는 플랫폼 목록은 SQL Server 2005 설치를 위한 하드웨어 및 소프트웨어 요구 사항을 참조하십시오., Windows Vista, Windows Mobile 5.0, Windows Mobile 2003 for Pocket PC, Windows CE 5.0
참고 항목
참조
ReportingService2006 Class
ReportingService2006 Members
ReportService2006 Namespace