Partilhar via


Método CreateResource

Adiciona um novo recurso ao banco de dados do servidor de relatório.

Namespace:  ReportService2005
Assembly:  ReportService2005 (em ReportService2005.dll)

Sintaxe

'Declaração
<SoapDocumentMethodAttribute("https://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices/CreateResource", 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("BatchHeaderValue")> _
<SoapHeaderAttribute("ServerInfoHeaderValue", Direction := SoapHeaderDirection.Out)> _
Public Sub CreateResource ( _
    Resource As String, _
    Parent As String, _
    Overwrite As Boolean, _
    Contents As Byte(), _
    MimeType As String, _
    Properties As Property() _
)
'Uso
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)
[SoapDocumentMethodAttribute("https://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices/CreateResource", 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("BatchHeaderValue")]
[SoapHeaderAttribute("ServerInfoHeaderValue", Direction = SoapHeaderDirection.Out)]
public void CreateResource(
    string Resource,
    string Parent,
    bool Overwrite,
    byte[] Contents,
    string MimeType,
    Property[] Properties
)
[SoapDocumentMethodAttribute(L"https://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices/CreateResource", 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"BatchHeaderValue")]
[SoapHeaderAttribute(L"ServerInfoHeaderValue", Direction = SoapHeaderDirection::Out)]
public:
void CreateResource(
    String^ Resource, 
    String^ Parent, 
    bool Overwrite, 
    array<unsigned char>^ Contents, 
    String^ MimeType, 
    array<Property^>^ Properties
)
[<SoapDocumentMethodAttribute("https://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices/CreateResource", 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("BatchHeaderValue")>]
[<SoapHeaderAttribute("ServerInfoHeaderValue", Direction = SoapHeaderDirection.Out)>]
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[]
)

Parâmetros

  • Parent
    Tipo: System. . :: . .String
    A URL totalmente qualificada da pasta pai na qual adicionar o novo recurso.
  • Overwrite
    Tipo: System. . :: . .Boolean
    Uma expressão Boolean que especifica se um recurso existente com o mesmo nome e caminho deve ser substituído. O valor padrão é false.
  • MimeType
    Tipo: System. . :: . .String
    O tipo MIME (Multipurpose Internet Mail Extensions) do recurso. O tamanho máximo é 260 caracteres.

Comentários

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.