ReportingService2006.CreateResource Method (String, String, Boolean, Byte[], String, Property[])


Adds a new resource to a SharePoint library.

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

public CatalogItem CreateResource(
	string Resource,
	string Parent,
	bool Overwrite,
	byte[] Contents,
	string MimeType,
	Property[] Properties


Type: System.String

The name of the new resource.

Type: System.String

The fully qualified URL for the parent folder that will contain the resource.

Type: System.Boolean

A Boolean expression that specifies whether to overwrite an existing resource with the same name and path. The default value is false.

Type: System.Byte[]

The contents of the resource file.

Type: System.String

The MIME type of the resource. The maximum size is 260 characters.

Type: ReportService2006.Property[]

An array of Property objects that defines the property names and values to set for the resource.

Return Value

Type: ReportService2006.CatalogItem

A CatalogItem object for the newly created resource.

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

SOAP Headers

(In) TrustedUserHeaderValue

(Out) ServerInfoHeaderValue

Required Permissions

Creating a new resource: AddListItems on Parent

Updating an existing resource: EditListItems on Resource

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

The Parent parameter 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.

If errors occur, the resource is not created.

Adding a resource to a SharePoint library modifies the ModifiedBy and ModifiedDate properties of the parent folder.

Return to top