Поделиться через


Метод GenerateModel

Создает модель по умолчанию на основе общего источника данных.

Пространство имен:  ReportService2006
Сборка:  ReportService2006 (в ReportService2006.dll)

Синтаксис

'Декларация
<SoapHeaderAttribute("ServerInfoHeaderValue", Direction := SoapHeaderDirection.Out)> _
<SoapHeaderAttribute("TrustedUserHeaderValue")> _
<SoapDocumentMethodAttribute("https://schemas.microsoft.com/sqlserver/2006/03/15/reporting/reportingservices/GenerateModel", RequestNamespace := "https://schemas.microsoft.com/sqlserver/2006/03/15/reporting/reportingservices",  _
    ResponseNamespace := "https://schemas.microsoft.com/sqlserver/2006/03/15/reporting/reportingservices",  _
    Use := SoapBindingUse.Literal, ParameterStyle := SoapParameterStyle.Wrapped)> _
Public Function GenerateModel ( _
    DataSource As String, _
    Model As String, _
    Parent As String, _
    Properties As Property(), _
    <OutAttribute> ByRef Warnings As Warning() _
) As CatalogItem
'Применение
Dim instance As ReportingService2006
Dim DataSource As String
Dim Model As String
Dim Parent As String
Dim Properties As Property()
Dim Warnings As Warning()
Dim returnValue As CatalogItem

returnValue = instance.GenerateModel(DataSource, _
    Model, Parent, Properties, Warnings)
[SoapHeaderAttribute("ServerInfoHeaderValue", Direction = SoapHeaderDirection.Out)]
[SoapHeaderAttribute("TrustedUserHeaderValue")]
[SoapDocumentMethodAttribute("https://schemas.microsoft.com/sqlserver/2006/03/15/reporting/reportingservices/GenerateModel", RequestNamespace = "https://schemas.microsoft.com/sqlserver/2006/03/15/reporting/reportingservices", 
    ResponseNamespace = "https://schemas.microsoft.com/sqlserver/2006/03/15/reporting/reportingservices", 
    Use = SoapBindingUse.Literal, ParameterStyle = SoapParameterStyle.Wrapped)]
public CatalogItem GenerateModel(
    string DataSource,
    string Model,
    string Parent,
    Property[] Properties,
    out Warning[] Warnings
)
[SoapHeaderAttribute(L"ServerInfoHeaderValue", Direction = SoapHeaderDirection::Out)]
[SoapHeaderAttribute(L"TrustedUserHeaderValue")]
[SoapDocumentMethodAttribute(L"https://schemas.microsoft.com/sqlserver/2006/03/15/reporting/reportingservices/GenerateModel", RequestNamespace = L"https://schemas.microsoft.com/sqlserver/2006/03/15/reporting/reportingservices", 
    ResponseNamespace = L"https://schemas.microsoft.com/sqlserver/2006/03/15/reporting/reportingservices", 
    Use = SoapBindingUse::Literal, ParameterStyle = SoapParameterStyle::Wrapped)]
public:
CatalogItem^ GenerateModel(
    String^ DataSource, 
    String^ Model, 
    String^ Parent, 
    array<Property^>^ Properties, 
    [OutAttribute] array<Warning^>^% Warnings
)
[<SoapHeaderAttribute("ServerInfoHeaderValue", Direction = SoapHeaderDirection.Out)>]
[<SoapHeaderAttribute("TrustedUserHeaderValue")>]
[<SoapDocumentMethodAttribute("https://schemas.microsoft.com/sqlserver/2006/03/15/reporting/reportingservices/GenerateModel", RequestNamespace = "https://schemas.microsoft.com/sqlserver/2006/03/15/reporting/reportingservices", 
    ResponseNamespace = "https://schemas.microsoft.com/sqlserver/2006/03/15/reporting/reportingservices", 
    Use = SoapBindingUse.Literal, ParameterStyle = SoapParameterStyle.Wrapped)>]
member GenerateModel : 
        DataSource:string * 
        Model:string * 
        Parent:string * 
        Properties:Property[] * 
        Warnings:Warning[] byref -> CatalogItem 
public function GenerateModel(
    DataSource : String, 
    Model : String, 
    Parent : String, 
    Properties : Property[], 
    Warnings : Warning[]
) : CatalogItem

Параметры

  • DataSource
    Тип: System. . :: . .String
    Полный URL-адрес источника данных, включая имя файла и расширение RSDS.
  • Parent
    Тип: System. . :: . .String
    Полный URL-адрес родительской папки, в которой будет содержаться модель.
  • Properties
    Тип: array<ReportService2006. . :: . .Property> [] () [] []
    XML-код, определяющий свойства, которые задаются в модели, и значения этих свойств.
    На верхнем уровне располагается элемент Properties.
  • Warnings
    Тип: array<ReportService2006. . :: . .Warning> [] () [] []%
    [out] Массив объектов Warning, которые описывают все предупреждения, которые могут случиться при создании модели. На верхнем уровне располагается элемент Warning.

Возвращаемое значение

Тип: ReportService2006. . :: . .CatalogItem
Объект CatalogItem для созданной модели.

Замечания

The table below shows header and permissions information on this operation.

SOAP Headers

(In) TrustedUserHeaderValue

(Out) ServerInfoHeaderValue

Required Permissions

AddListItems()()()() on Parent AND ViewListItems()()()() on DataSource

The report server sets the IsGenerated property on the generated model when GenerateModel is called.

Models are generated by using the credentials specified in the shared data source. As a result, two different users can generate different models from the same data source. Note that when a shared data source is configured to store credentials in the report server, GenerateModel always impersonates the user whose credentials are stored, even if the shared data source is configured to impersonate the currently authenticated user.

When the model is created, the default model item security is applied to the nodes in the model.

When the model definition is generated, custom properties stored in the model definition are propagated as custom properties on the model item in the folder namespace, and new custom property values overwrite existing custom property values.