共用方式為


ReportingService2005.CreateResource 方法

Adds a new resource to the report server database.

命名空間:  ReportService2005
組件:  ReportService2005 (在 ReportService2005.dll 中)

語法

'宣告
Public Sub CreateResource ( _
    Resource As String, _
    Parent As String, _
    Overwrite As Boolean, _
    Contents As Byte(), _
    MimeType As String, _
    Properties As Property() _
)
'用途
Dim instance As ReportingService2005 
Dim Resource As String 
Dim Parent As String 
Dim Overwrite As Boolean 
Dim Contents As Byte()
Dim MimeType As String 
Dim Properties As Property()

instance.CreateResource(Resource, Parent, _
    Overwrite, Contents, MimeType, Properties)
public void CreateResource(
    string Resource,
    string Parent,
    bool Overwrite,
    byte[] Contents,
    string MimeType,
    Property[] Properties
)
public:
void CreateResource(
    String^ Resource, 
    String^ Parent, 
    bool Overwrite, 
    array<unsigned char>^ Contents, 
    String^ MimeType, 
    array<Property^>^ Properties
)
member CreateResource : 
        Resource:string * 
        Parent:string * 
        Overwrite:bool * 
        Contents:byte[] * 
        MimeType:string * 
        Properties:Property[] -> unit
public function CreateResource(
    Resource : String, 
    Parent : String, 
    Overwrite : boolean, 
    Contents : byte[], 
    MimeType : String, 
    Properties : Property[]
)

參數

  • Parent
    型別:System.String
    The fully qualified URL of the parent folder to which to add the new resource.
  • Overwrite
    型別:System.Boolean
    A Boolean expression that specifies whether to overwrite an existing resource with the same name and path. The default value is false.
  • Contents
    型別:array<System.Byte[]
    The contents of the resource file.
  • MimeType
    型別:System.String
    The Multipurpose Internet Mail Extensions (MIME) type of the resource. The maximum size is 260 characters.

備註

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

SOAP Headers

(In) BatchHeaderValue

(Out) ServerInfoHeaderValue

Required Permissions

Creating a new resource: CreateResource on Parent

Updating an existing resource: UpdateContent on Resource

Updating resource properties: UpdateContent AND UpdateProperties 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 the report server database modifies the ModifiedBy and ModifiedDate properties of the parent folder.

請參閱

參考

ReportingService2005 類別

ReportService2005 命名空間