AggregationParamID: String;
AggregationParamID: string;
The AggregationParamID property determines an identifier of the parameters that are used to determine aggregated elements.
The values of the IMsAggregationFilter.AggregationGroup and the IMsAggregationFilter.AggregationSelection properties are reset, if the value is set for this property.
Depending on the IMsAggregationFilter.UseParamAsGroup property value the parameter is considered as a separate element or a group of elements.
Executing the example requires that the repository contains a time series database with the FC identifier. The modeling container of this database must contain a metamodel that includes the Aggr_Param parameter. The calculation chain of metamodel must contain a model with the MODEL_AGGR identifier that is calculated by the method of extended aggregation. COUNTRY is the attribute of time series database that refers to the dictionary.
Add links to the Metabase, Ms, Cubes, Dimensions system assemblies.
Sub UserProc;
Var
mb: IMetabase;
RubrDescr: IMetabaseObjectDescriptor;
Rubr: IRubricator;
msDescr: IMetabaseObjectDescriptor;
Model: IMsModel;
Transform: IMsFormulaTransform;
Formula: IMsFormula;
Aggr: IMsCrossDimensionAggregationTransform;
FiltesList: IMsAggregationFilterList;
Filter: IMsAggregationFilter;
Attributes: IMetaAttributes;
DictDescr: IMetabaseObjectDescriptor;
Begin
mb := MetabaseClass.Active;
RubrDescr := mb.ItemById("FC");
Rubr := RubrDescr.Bind As IRubricator;
msDescr := Rubr.ModelSpace;
Model := mb.ItemByIdNamespace("MODEL_AGGR", msDescr.Key).Edit As IMsModel;
Transform := Model.Transform;
Formula := Transform.FormulaItem(0);
Aggr := Formula.Method As IMsCrossDimensionAggregationTransform;
FiltesList := Aggr.Filter;
Attributes := Rubr.Facts.Attributes;
DictDescr := Attributes.FindById("COUNTRY").ValuesObject;
Filter := FiltesList.Add(DictDescr.Bind As IDimensionModel);
Filter.AggregationParamID := "Aggr_Param";
(Model As IMetabaseObject).Save;
End Sub UserProc;
After executing the example a new filter is added to the model of extended aggregation: aggregation is calculated for elements that are determined by the Aggr_Param parameter.
The requirements and result of the Fore.NET example execution match with those in the Fore example.
Imports Prognoz.Platform.Interop.Cubes;
Imports Prognoz.Platform.Interop.Dimensions;
Imports Prognoz.Platform.Interop.Ms;
Imports Prognoz.Platform.Interop.Rds;
…
Public Shared Sub Main(Params: StartParams);
Var
mb: IMetabase;
RubrDescr: IMetabaseObjectDescriptor;
Rubr: IRubricator;
msDescr: IMetabaseObjectDescriptor;
Model: IMsModel;
Transform: IMsFormulaTransform;
Formula: IMsFormula;
Aggr: IMsCrossDimensionAggregationTransform;
FiltesList: IMsAggregationFilterList;
Filter: IMsAggregationFilter;
Attributes: IMetaAttributes;
DictDescr: IMetabaseObjectDescriptor;
Begin
mb := Params.Metabase;
RubrDescr := mb.ItemById["FC"];
Rubr := RubrDescr.Bind() As IRubricator;
msDescr := Rubr.ModelSpace;
Model := mb.ItemByIdNamespace["MODEL_AGGR", msDescr.Key].Edit() As IMsModel;
Transform := Model.Transform;
Formula := Transform.FormulaItem[0];
Aggr := Formula.Method As IMsCrossDimensionAggregationTransform;
FiltesList := Aggr.Filter;
Attributes := Rubr.Facts.Attributes;
DictDescr := Attributes.FindById("COUNTRY").ValuesObject;
Filter := FiltesList.Add(DictDescr.Bind() As IDimensionModel);
Filter.AggregationParamID := "Aggr_Param";
(Model As IMetabaseObject).Save();
End Sub;
See also: