Matrix: IMatrix;
The Matrix property returns data matrix corresponding to the areas selected in the object.
To get selection corresponding to all areas selected in the object, use the IEaxObjectSelection.Combined property.
Executing the example requires that repository contains express report with the EAX_SEL_MANAGER identifier. This report should contain the table with several selected areas.
Add links to the Express, Matrix, Metabase system assemblies.
Sub UserProc;
Var
mb: IMetabase;
Report: IEaxAnalyzer;
SelManager: IEaxObjectSelectionManager;
ObjSel: IEaxObjectSelection;
Matrix: IMatrix;
Iter: IMatrixIterator;
Begin
// Get current repository
mb := MetabaseClass.Active;
// Get express report
Report := mb.ItemById("EAX_SEL_MANAGER").Bind As IEaxAnalyzer;
// Get object to work with selection used to build data table
SelManager := Report.Grid.SelectionManager;
// Get selection in the table
ObjSel := SelManager.Selection;
If ObjSel.Count > 0 Then
// Display data corresponding to areas selected in the table
Matrix := ObjSel.Matrix(ObjSel.Item(0));
Iter := Matrix.CreateIterator;
Iter.Move(IteratorDirection.First);
While Iter.Valid Do
Debug.WriteLine(Iter.Value);
Iter.Move(IteratorDirection.Next);
End While;
End If;
End Sub UserProc;
After executing the example the console displays data corresponding to the areas selected in the table.
See also: