Slice : IPrxSlice;
The Slice property returns the slice used as a data source.
Executing the example requires a regular report with the REGULAR_REPORT identifier that contains a map data slice. Add links to the Metabase, Report, Tab, Map system assemblies.
Sub UserProc;
Var
MB: IMetabase;
Report: IPrxReport;
Sheet: IPrxSheet;
PrxTable: IPrxTable;
Tab: ITabSheet;
Map: IMap;
PrxDA: IPrxMapDataAdapter;
Begin
MB := MetabaseClass.Active;
Report := MB.ItemById("REGULAR_REPORT").Edit As IPrxReport;
Sheet := Report.Sheets.Item(0);
PrxTable := Sheet As IPrxTable;
Tab := PrxTable.TabSheet;
Map := Tab.Objects.Item(0).Extension As IMap;
PrxDA := Map.Layers.FindByName("Regions").Visuals.Item(0).DataAdapter As IPrxMapDataAdapter;
Tab.CellValue(1, 1) := PrxDa.Slice.Name;
Debug.WriteLine("0-No object, 1-Map, 2-Graph: " + PrxDA.Consumer.ToString);
(Report As IMetabaseObject).Save;
End Sub UserProc;
The specified cell displays name of the slice that is a data source for the indicator. The console window displays a type of object that is used by data source.
See also: