SelectionSchema: IDimSelectionSchema;
SelectionSchema: Prognoz.Platform.Interop.Dimensions.IDimSelectionSchema;
The SelectionSchema property determines selection schema for dictionary elements.
Executing the example requires a dictionary with the D_TO identifier in the repository, that includes a selection schema with the Schema_1 identifier, and an express report with the EXPRESS_REPORT identifier.
Sub Main;
Var
MB: IMetabase;
MObj: IMetabaseObject;
Eax: IEaxAnalyzer;
DimSelection: IDimSelection;
schema: IDimSelectionSchema;
Begin
MB := MetabaseClass.Active;
MObj := MB.ItemById("EXPRESS_REPORT").Edit;
schema := MB.ItemByIdNamespace("Schema_1", MB.ItemById("D_TO").Key).Edit As IDimSelectionSchema;
Eax := MObj As IEaxAnalyzer;
DimSelection := Eax.Pivot.Selection.FindById("D_TO");
DimSelection.ApplySelectionSchemaOnlyOnce := True;
DimSelection.SelectionSchema := schema;
Mobj.Save;
End Sub Main;
After executing the example the schema of element selection with the Schema_1 identifier is used when the dictionary is opened. Element selection can be later changed.
Executing the example requires a dictionary with the D_TO identifier in the repository, that includes a selection schema with the Schema_1 identifier, and an express report with the EXPRESS_REPORT identifier.
Imports Prognoz.Platform.Interop.Dimensions;
Imports Prognoz.Platform.Interop.Express;
Public Class Program
[STAThread]
Public Shared Sub Main(Params: StartParams);
Var
MB: IMetabase;
MObj: IMetabaseObject;
Eax: IEaxAnalyzer;
DimSelection: IDimSelection;
schema: IDimSelectionSchema;
Begin
MB := Params.Metabase;
MObj := MB.ItemById["EXPRESS_REPORT"].Edit();
schema := MB.ItemByIdNamespace["Schema_1", MB.ItemById["D_TO"].Key].Edit() As IDimSelectionSchema;
Eax := MObj As IEaxAnalyzer;
DimSelection := Eax.Pivot.Selection.FindById("D_TO");
DimSelection.ApplySelectionSchemaOnlyOnce := True;
DimSelection.SelectionSchema := schema;
Mobj.Save();
End Sub;
End Class;
After executing the example the schema of element selection with the Schema_1 identifier is used when the dictionary is opened. Element selection can be later changed.
See also: