IMDCalculationDatasetInstance.CoordToText

Syntax

CoordToText(Coord: IMatrixCoord; [FactIndex: Integer = -1]): String;

Parameters

Coord. Coordinate corresponding to element in data source or data consumer.

FactIndex. Index of the factor, by which value must be obtained.

Description

The CoordToText property returns string view of the element, to which the coordinate corresponds in the data source or data consumer.

Example

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

Add links to the Cubes, Dimensions, Matrix, Metabase system assemblies.

Sub UserProc;
Var
    MB: IMetabase;
    MDInst: IMDCalculationInstance;
    Source: IMDCalculationSourceInstance;
    Slices: IMDCalculationSlicesInstance;
    Slice: IMDCalculationSliceInstance;
    Coord: IMatrixCoord;
    i, j: Integer;
Begin
    
// Get current repository
    MB := MetabaseClass.Active;
    
// Get multidimensional calculation on server
    MDInst := MB.ItemById("MDCALC").Open(NullAs IMDCalculationInstance;
    
// Get sources
    Source := MDInst.Sources.Item(0);
    
// Get slices
    Slices := Source.Slices;
    Coord := Source.NewCoord;
    
//In all slices, except for the first, select first elements
    For i := 1 To Slices.Count - 1 Do
        Coord.Item(i) := 
0;
    
End For;
    Slice := Source.Slices.Item(
0);
    j := Slice.Dimension.Elements.Count;
    
//View all elements of the first slice
    For i := 0 To j - 1 Do
        Coord.Item(
0) := i;
        Debug.WriteLine(Source.CoordToText(Coord));
    
End For;
End Sub UserProc;

After executing the example the development environment console displays string values of elements obtained by the first data source slice. The first elements are selected by the rest of non-fixed slices.

See also:

IMDCalculationDatasetInstance