Condividi tramite


Metodo GenerateModel

Genera un modello predefinito basato su un'origine dati condivisa.

Spazio dei nomi  ReportService2005
Assembly:  ReportService2005 (in ReportService2005.dll)

Sintassi

'Dichiarazione
<SoapHeaderAttribute("BatchHeaderValue")> _
<SoapHeaderAttribute("ServerInfoHeaderValue", Direction := SoapHeaderDirection.Out)> _
<SoapDocumentMethodAttribute("https://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices/GenerateModel", RequestNamespace := "https://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices",  _
    ResponseNamespace := "https://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices",  _
    Use := SoapBindingUse.Literal, ParameterStyle := SoapParameterStyle.Wrapped)> _
Public Function GenerateModel ( _
    DataSource As String, _
    Model As String, _
    Parent As String, _
    Properties As Property() _
) As Warning()
'Utilizzo
Dim instance As ReportingService2005
Dim DataSource As String
Dim Model As String
Dim Parent As String
Dim Properties As Property()
Dim returnValue As Warning()

returnValue = instance.GenerateModel(DataSource, _
    Model, Parent, Properties)
[SoapHeaderAttribute("BatchHeaderValue")]
[SoapHeaderAttribute("ServerInfoHeaderValue", Direction = SoapHeaderDirection.Out)]
[SoapDocumentMethodAttribute("https://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices/GenerateModel", RequestNamespace = "https://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices", 
    ResponseNamespace = "https://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices", 
    Use = SoapBindingUse.Literal, ParameterStyle = SoapParameterStyle.Wrapped)]
public Warning[] GenerateModel(
    string DataSource,
    string Model,
    string Parent,
    Property[] Properties
)
[SoapHeaderAttribute(L"BatchHeaderValue")]
[SoapHeaderAttribute(L"ServerInfoHeaderValue", Direction = SoapHeaderDirection::Out)]
[SoapDocumentMethodAttribute(L"https://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices/GenerateModel", RequestNamespace = L"https://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices", 
    ResponseNamespace = L"https://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices", 
    Use = SoapBindingUse::Literal, ParameterStyle = SoapParameterStyle::Wrapped)]
public:
array<Warning^>^ GenerateModel(
    String^ DataSource, 
    String^ Model, 
    String^ Parent, 
    array<Property^>^ Properties
)
[<SoapHeaderAttribute("BatchHeaderValue")>]
[<SoapHeaderAttribute("ServerInfoHeaderValue", Direction = SoapHeaderDirection.Out)>]
[<SoapDocumentMethodAttribute("https://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices/GenerateModel", RequestNamespace = "https://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices", 
    ResponseNamespace = "https://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices", 
    Use = SoapBindingUse.Literal, ParameterStyle = SoapParameterStyle.Wrapped)>]
member GenerateModel : 
        DataSource:string * 
        Model:string * 
        Parent:string * 
        Properties:Property[] -> Warning[] 
public function GenerateModel(
    DataSource : String, 
    Model : String, 
    Parent : String, 
    Properties : Property[]
) : Warning[]

Parametri

  • DataSource
    Tipo: System. . :: . .String
    Percorso di un'origine dati condivisa sul server dal quale generare il modello.
  • Properties
    Tipo: array<ReportService2005. . :: . .Property> [] () [] []
    Codice XML che definisce le proprietà da impostare per il modello con i relativi valori.
    L'elemento di livello principale è Properties.

Valore restituito

Tipo: array<ReportService2005. . :: . .Warning> [] () [] []
Matrice di oggetti Warning che descrivono gli avvisi che potrebbero essere stati visualizzati durante la generazione del modello. L'elemento di livello principale è Warning.

Osservazioni

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

SOAP Headers

(In) BatchHeaderValue

(Out) ServerInfoHeaderValue

Required Permissions

ReadProperties on DataSource AND CreateModel on Parent

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

Models are generated 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.