IMDCalculationDatasetInstance.View

Syntax

View: ICalculatedCubeFormulasView;

Description

The View property returns display parameters of elements in dimensions and formulas of multidimensional calculation.

Example

Executing the example requires that the repository contains multidimensional calculation on DB server with the MDCalc_1 identifier.

Sub UserProc;
Var
    MB: IMetabase;
    MDCalc: IMDCalculationInstance;
    Source: IMDCalculationSourceInstance;
    View: ICalculatedCubeFormulasView;
    Slice: IMDCalculationSliceInstance;
    Dim: IDimensionModel;
Begin
    MB := MetabaseClass.Active;
    //Multidimensional calculation
    MDCalc := MB.ItemById("MDCalc_1").Open(NullAs IMDCalculationInstance;
    //Data source of multidimensional calculation
    Source := MDCalc.Sources.FindById("Data_1");
    Slice := Source.Slices.FindById("Country");
    Dim := Slice.Dimension.Dimension;
    //Display parameters for dimensions and for formulas
    View := Source.View;
    View.FormulaNaming(Slice.Key) := Dim.Attributes.Id;
    View.ViewNaming(Slice.Key) := Dim.Attributes.Name;
    MDCalc.SaveView;
End Sub UserProc;

On executing the example display parameters of elements in dimension and formulas are set up for the specified dimension of data source. The names are displayed in the dimension, and the element identifiers are displayed in formulas.

See also:

IMDCalculationDatasetInstance