語言

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 資料由語意模型定義語言(Semantic Model Definition Language) http://schemas.microsoft.com/sqlserver/2004/10/semanticmodeling/ 定義。

Properties
Property[]

一個定義模型屬性及其值的物件陣列 Property 。

Warnings
Warning[]

[出]一組 Warning 物件陣列描述在驗證模型定義期間可能出現的任何警告,若 CreateModel(String, String, Byte[], Property[], Warning[]) 成功呼叫;否則會提出例外。

傳回

一個 CatalogItem 新模型的物件。

備註

下表顯示此操作的標頭與權限資訊。

SOAP 標頭 (在) TrustedUserHeaderValue

(出局) ServerInfoHeaderValue
必要權限 在 <xref:Microsoft.SharePoint.SPBasePermissions.AddListItems> 上出現 Parent

模型項目安全在模型剛建立時會關閉。

ModifiedBy當成功呼叫時,父資料夾的 and ModifiedDate 屬性會被更新CreateModel。

若型號名稱中排除 .smdl 副檔名, rsFileExtensionRequired 則會回傳錯誤。

參數長度 Parent 不得超過 260 個字元;否則會拋出帶有錯誤碼 rsItemLengthExceed 的 SOAP 例外。

Parent參數不能為空或空,或包含以下保留字元: : ? ; @ & = + $ , \ * > < | . "。 你可以用斜線字元(/)來分隔資料夾完整路徑名稱中的項目,但不能用在資料夾名稱的末尾。

適用於