ReportingService2005.CreateResource 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
向报告服务器数据库添加一个新资源。
public:
void CreateResource(System::String ^ Resource, System::String ^ Parent, bool Overwrite, cli::array <System::Byte> ^ Contents, System::String ^ MimeType, cli::array <ReportService2005::Property ^> ^ Properties);
public void CreateResource(string Resource, string Parent, bool Overwrite, byte[] Contents, string MimeType, ReportService2005.Property[] Properties);
member this.CreateResource : string * string * bool * byte[] * string * ReportService2005.Property[] -> unit
Public Sub CreateResource (Resource As String, Parent As String, Overwrite As Boolean, Contents As Byte(), MimeType As String, Properties As Property())
参数
- Resource
- String
新资源的名称。
- Parent
- String
添加新资源的父文件夹的完全限定URL。
- Overwrite
- Boolean
一个 Boolean 表达式,指定是否覆盖具有相同名称和路径的现有资源。 默认值为 false。
- Contents
- Byte[]
资源文件的内容。
- MimeType
- String
资源的多功能互联网邮件扩展(MIME)类型。 最大字符大小为260字符。
注解
下表显示了该操作的头部和权限信息。
| SOAP 头部 | (在) BatchHeaderValue (出局) ServerInfoHeaderValue |
| 所需的权限 | 创建新资源: CreateResource 开启 Parent更新现有资源: UpdateContent 关于 Resource更新资源属性: UpdateContent AND UpdateProperties on Resource |
参数长度 Parent 不得超过260个字符;否则,会抛出带有错误代码 rsItemLengthExceed的SOAP异常。
Parent参数不能为空或空,也不能包含以下保留字符: : ? ; @ & = + $ , \ * > < | . "。 你可以用斜杠字符(/)分隔文件夹完整路径名称中的项目,但不能在文件夹名称末尾使用。
如果出现错误,资源不会被创建。
向报告服务器数据库添加资源会 ModifiedBy 修改父文件夹的 和 ModifiedDate 属性。