ReportingService2006.CreateModel 方法

定义

将模型添加到 SharePoint 库。

public:
 ReportService2006::CatalogItem ^ CreateModel(System::String ^ Model, System::String ^ Parent, cli::array <System::Byte> ^ Definition, cli::array <ReportService2006::Property ^> ^ Properties, [Runtime::InteropServices::Out] cli::array <ReportService2006::Warning ^> ^ % Warnings);
public ReportService2006.CatalogItem CreateModel (string Model, string Parent, byte[] Definition, ReportService2006.Property[] Properties, out ReportService2006.Warning[] Warnings);
member this.CreateModel : string * string * byte[] * ReportService2006.Property[] * Warning[] -> ReportService2006.CatalogItem
Public Function CreateModel (Model As String, Parent As String, Definition As Byte(), Properties As Property(), ByRef Warnings As Warning()) As CatalogItem

参数

Model
String

新模型的名称,其中包括文件名和 .smdl 文件扩展名。

Parent
String

将包含新模型的父文件夹的完全限定 URL。

Definition
Byte[]

要发布的报表模型定义。 XML 数据由 http://schemas.microsoft.com/sqlserver/2004/10/semanticmodeling/ 语义模型定义语言 定义。

Properties
Property[]

Property 对象的数组,它定义模型的属性和属性值。

Warnings
Warning[]

[out] 如果成功调用 Warning,则返回一个 CreateModel(String, String, Byte[], Property[], Warning[]) 对象的数组,该数组说明在模型定义验证过程中可能出现的所有警告;否则将引发异常。

返回

一个用于新创建的模型的 CatalogItem 对象。

注解

下表显示了有关此操作的标头和权限信息。

SOAP 标头 (In) TrustedUserHeaderValue

(Out) ServerInfoHeaderValue
所需的权限 Parent 上的 <xref:Microsoft.SharePoint.SPBasePermissions.AddListItems>

首次创建模型时,模型项安全性处于关闭状态。

ModifiedBy成功调用 时CreateModel,将更新父文件夹的 和 ModifiedDate 属性。

如果从模型名称中排除 .smdl 文件扩展名,将返回错误 rsFileExtensionRequired

参数的 Parent 长度不能超过 260 个字符;否则,将引发 SOAP 异常,错误代码 为 rsItemLengthExceeded

参数 Parent 不能为 null 或空,也不能包含以下保留字符: : ? ; @ & = + $ , \ * > < | . "。 可以使用 /) (正斜杠字符分隔文件夹的完整路径名称中的项目,但不能在文件夹名称的末尾使用它。

适用于