ParamProvider: Object;
The ParamProvider property returns the object to work with express report parameters.
After data source parameters editing, the data source must be updated. To update, use IEaxAnalyzeCore.UpdateParamProvider.
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.
See also: