Slices: IPrxSlices;
The Slices property returns the collection of data source slices.
Executing the example requires that the repository contains a regular report with the REPORT identifier that contains at least two data source slices.
Add links to the Metabase, Report system assemblies.
Sub UserProc;
Var
MB: IMetabase;
Report: IPrxReport;
DIs: IPrxDataIslands;
DI: IPrxDataIsland;
Slices: IPrxSlices;
SlicesCount, i: Integer;
Begin
// Get the current repository
MB := MetabaseClass.Active;
// Get regular report
Report := MB.ItemById("REPORT").Bind As IPrxReport;
// Get the first data area
DIs := Report.DataIslands;
DI := DIs.Item(0);
// Get the collection of data source slices
Slices := DI.Slice.Slices;
// Display the number and names of data source slices in the console
SlicesCount := Slices.Count;
Debug.WriteLine("Number of data source slices: " + SlicesCount.ToString);
Debug.WriteLine("Slice names:");
For i := 0 To SlicesCount - 1 Do
Debug.WriteLine(Slices.Item(i).Name)
End For;
End Sub UserProc;
After executing the example the console displays the number and names of data source slices.
See also: