IEaxAnalyzerCore.ParamProvider

Fore Syntax

ParamProvider: Object;

Fore.NET Syntax

ParamProvider: object;

Description

The ParamProvider property returns the object to work with express report parameters.

Comments

After data source parameters editing, the data source must be updated. To update data source, use IEaxAnalyzerCore.UpdateParamProvider.

Fore Example

Executing the example requires that the repository contains an express report with the EXPRESS identifier. A data source is a cube.

Add links to the Dal, Express, Metabase, Ms, Transform system assemblies.

Sub UserProc;
Var
    MB: IMetabase;
    MetObj: IMetabaseObject;
    Express: IEaxAnalyzer;
    CreateParam: IMetabaseObjectParam;
    CreateValues: IMetabaseObjectParamValues;
    Provider: IMsParamProvider;
    ModelParam: IMsModelParam;
Begin
    // Get repository
    MB := MetabaseClass.Active;
    // Get express report
    MetObj := MB.ItemById("EXPRESS").Edit;
    Express := MetObj As IEaxAnalyzer;
    // Create parameter
    CreateParam := MetObj.Params.Add;
    CreateParam.DataType := DbDataType.Integer;
    CreateParam.Name := "Parameter";
    CreateParam.DefaultValue := 100;
    // Create values for parameter
    CreateValues := CreateParam.Params.CreateEmptyValues;
    CreateValues.Item(0).Value := 150;
    // Set specified values for parameter
    Express.OwnParamValues := CreateValues;
    // Get object - data source
    Provider := Express.ParamProvider As IMsParamProvider;
    // Create parameter in data source
    ModelParam := Provider.Params.Add;
    ModelParam.Name := "Data_Parameter";
    ModelParam.DefaultValue := 1000;
    ModelParam.ParamType := TsParamType.Simple;
    // Update data source
    Express.UpdateParamProvider;
    // Save changes
    MetObj.Save;
End Sub UserProc;

After executing the example, a parameter named Parameter is created in the express report. A parameter named Data_Parameter will be created in the data source.

Fore.NET Example

The requirements and result of the Fore.NET example execution match with those in the Fore example.

Imports Prognoz.Platform.Interop.Dal;
Imports Prognoz.Platform.Interop.Express;
Imports Prognoz.Platform.Interop.Ms;
Imports Prognoz.Platform.Interop.Transform;

Public Shared Sub Main(Params: StartParams);
Var
    MB: IMetabase;
    MetObj: IMetabaseObject;
    Express: IEaxAnalyzer;
    CreateParam: IMetabaseObjectParam;
    CreateValues: IMetabaseObjectParamValues;
    Provider: IMsParamProvider;
    ModelParam: IMsModelParam;
Begin
    // Get repository
    MB := Params.Metabase;
    // Get express report
    MetObj := MB.ItemById["EXPRESS_IEAX"].Edit();
    Express := MetObj As IEaxAnalyzer;
    // Create parameter
    CreateParam := MetObj.Params.Add();
    CreateParam.DataType := DbDataType.ddtInteger;
    CreateParam.Name := "Parameter";
    CreateParam.DefaultValue := 100;
    // Create values for parameter
    CreateValues := CreateParam.Params.CreateEmptyValues();
    CreateValues.Item[0].Value := 150;
    // Set specified values for parameter
    Express.OwnParamValues := CreateValues;
    // Get object - data source
    Provider := Express.ParamProvider As IMsParamProvider;
    // Create parameter in data source
    ModelParam := Provider.Params.Add();
    ModelParam.Name := "Data Parameter";
    ModelParam.DefaultValue := 1000;
    ModelParam.ParamType := TsParamType.tsptSimple;
    // Update data source
    Express.UpdateParamProvider();
    // Save changes
    MetObj.Save();
End Sub;

See also:

IEaxAnalyzeCore