Cells: IDalCursor;
Cells: Prognoz.Platform.Interop.Dal.IDalCursor;
The Cells property returns the cursor that contains information about the set of cells with values obtained as the result of executing MDX query to the cubes.
Executing the example requires that the repository contains an ADOMD catalog with the ADOMDTest identifier. The cube with the Test physical name is contained in the catalog and the dimension with the Dim_1 name is the part of this cube structure.
Sub UserProc;
Var
MB: IMetabase;
Catalog: IAdoMdCatalogInstance;
Connection: IAdoMdConnection;
sMDX: String;
Cellset: IAdoMdCellset;
CellsCursor: IDalCursor;
CFields: IDalCursorFields;
CField: IDalCursorField;
i: Integer;
Begin
MB := MetabaseClass.Active;
Catalog := MB.ItemById("ADOMDTest").Open(Null) As IAdoMdCatalogInstance;
Connection := Catalog.Connection;
sMDX := "SELECT ...";
Cellset := Connection.Cellset(sMDX);
//Cursor
CellsCursor := Cellset.Cells;
CFields := CellsCursor.Fields;
While Not CellsCursor.Eof Do
For i := 0 To CFields.Count - 1 Do
CField := CFields.Item(i);
Debug.WriteLine(CField.Name + " | " + CField.Value);
End For;
CellsCursor.Next;
End While;
End Sub UserProc;
The cursor with the cells values, which are the results of execution of specified multidimensional query, is obtained when executing the example. The results are displayed in the development environment console.
Executing the example requires that the repository contains an ADOMD catalog with the ADOMDTest identifier. The cube with the Test physical name is contained in the catalog and the dimension with the Dim_1 name is the part of this cube structure. The example is an entry point of the .NET assembly.
Imports Prognoz.Platform.Interop.AdoMd;
Imports Prognoz.Platform.Interop.Dal;
Imports Prognoz.Platform.Interop.Metabase;
Public Shared Sub Main(Params: StartParams);
Var
MB: IMetabase;
Catalog: IAdoMdCatalogInstance;
Connection: IAdoMdConnection;
sMDX: String;
Cellset: IAdoMdCellset;
CellsCursor: IDalCursor;
CFields: IDalCursorFields;
CField: IDalCursorField;
i: Integer;
Begin
MB := Params.Metabase;
Catalog := MB.ItemById["ADOMDTest"].Open(Null) As IAdoMdCatalogInstance;
Connection := Catalog.Connection;
sMDX := "SELECT ...";
Cellset := Connection.Cellset(sMDX);
//Cursor
CellsCursor := Cellset.Cells;
CFields := CellsCursor.Fields;
While Not CellsCursor.Eof() Do
For i := 0 To CFields.Count - 1 Do
CField := CFields.Item[i];
System.Diagnostics.Debug.WriteLine(CField.Name + " | " + CField.Value);
End For;
CellsCursor.Next();
End While;
End Sub;
The cursor with the cells values, which are the results of execution of specified multidimensional query, is obtained when executing this example. The results are displayed in the development environment console.
See also: