ReportingService2010.GenerateModel 方法

定义

在共享数据源上生成默认模型。

public:
 ReportService2010::CatalogItem ^ GenerateModel(System::String ^ DataSource, System::String ^ Model, System::String ^ Parent, cli::array <ReportService2010::Property ^> ^ Properties, [Runtime::InteropServices::Out] cli::array <ReportService2010::Warning ^> ^ % Warnings);
[System.Web.Services.Protocols.SoapDocumentMethod("http://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer/GenerateModel", ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped, RequestNamespace="http://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer", ResponseNamespace="http://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer", Use=System.Web.Services.Description.SoapBindingUse.Literal)]
[System.Web.Services.Protocols.SoapHeader("ServerInfoHeaderValue", Direction=System.Web.Services.Protocols.SoapHeaderDirection.Out)]
[System.Web.Services.Protocols.SoapHeader("TrustedUserHeaderValue")]
public ReportService2010.CatalogItem GenerateModel (string DataSource, string Model, string Parent, ReportService2010.Property[] Properties, out ReportService2010.Warning[] Warnings);
[<System.Web.Services.Protocols.SoapDocumentMethod("http://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer/GenerateModel", ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped, RequestNamespace="http://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer", ResponseNamespace="http://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer", Use=System.Web.Services.Description.SoapBindingUse.Literal)>]
[<System.Web.Services.Protocols.SoapHeader("ServerInfoHeaderValue", Direction=System.Web.Services.Protocols.SoapHeaderDirection.Out)>]
[<System.Web.Services.Protocols.SoapHeader("TrustedUserHeaderValue")>]
member this.GenerateModel : string * string * string * ReportService2010.Property[] * Warning[] -> ReportService2010.CatalogItem
Public Function GenerateModel (DataSource As String, Model As String, Parent As String, Properties As Property(), ByRef Warnings As Warning()) As CatalogItem

参数

DataSource
String

数据源的完全限定 URL,包括文件名和 .rsds 文件扩展名。

Model
String

要创建的模型的名称。

Parent
String

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

Properties
Property[]

定义要对模型设置的属性的 XML,该 XML 还定义要为这些属性设置的值。

顶级元素是 Properties。

Warnings
Warning[]

[out] Warning 对象的数组,该数组说明在生成模型的过程中可能出现的所有警告。 顶级元素是 Warning

返回

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

属性

注解

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

SOAP 标头用法 (In) TrustedUserHeaderValue

(Out) ServerInfoHeaderValue
本机模式所需的权限 ReadProperties on DataSource AND CreateModel on Parent
SharePoint 模式所需权限 <xref:Microsoft.SharePoint.SPBasePermissions.AddListItems> on Parent AND <xref:Microsoft.SharePoint.SPBasePermissions.ViewListItems> on DataSource

调用 时GenerateModel,报表服务器在生成的模型上设置 IsGenerated 属性。

模型是使用共享数据源中指定的凭据生成的。 因此,两个不同的用户可以从同一数据源生成不同的模型。 请注意,当共享数据源配置为在报表服务器中存储凭据时, GenerateModel 始终模拟存储其凭据的用户,即使共享数据源配置为模拟当前经过身份验证的用户也是如此。

创建模型时,默认模型项安全性将应用于模型中的节点。

生成模型定义时,存储在模型定义中的自定义属性将作为自定义属性传播到文件夹命名空间中的模型项上,新的自定义属性值将覆盖现有的自定义属性值。

适用于