Slice: IEaxDataAreaSlice;
Slice: Proznoz.Platform.Interop.Express.IEaxDataAreaSlice;
The Slice property returns parent object.
The following can be used as data sources:
All types of cubes.
Time series databases.
Relational objects: tables, queries, views, external tables, ODBS data sources.
Express reports.
Files.
Other sources: modeling variables and file cubes (*.ppcube files).
Executing the example requires that the repository contains a regular report with the REG_REPORT_SLICE identifier. Report contains several data slices.
Add links to the Express, Metabase and Report system assemblies.
Sub UserProc;
Var
MB: IMetabase;
RegRep: IPrxReport;
DataArea: IEaxDataArea;
DataAreaSlices: IEaxDataAreaSlices;
DataAreaSlice: IEaxDataAreaSlice;
Properties: IEaxDataAreaSliceProperties;
Slice: IEaxDataAreaSlice;
id: String;
i: integer;
Begin
// Get repository
MB := MetabaseClass.Active;
// Get regular report
RegRep := MB.ItemById("REG_REPORT_SLICE").Bind As IPrxReport;
// Get collection of data slices
DataArea := RegRep.DataArea;
DataAreaSlices := DataArea.Slices;
// Display identifiers of slices parent objects to the console
For i := 0 To DataAreaSlices.Count - 1 Do
DataAreaSlice := DataAreaSlices.Item(i);
Properties := DataAreaSlice.Properties;
Slice := Properties.Slice;
id := Slice.Id;
Debug.WriteLine("Parent objecrt identifier of data slice = " + id);
End For;
End Sub UserProc;
After executing the example the console displays identifiers of parent objects of data slices.
The requirements and result of the Fore.NET Example execution match with those in the Fore Example.
Imports Prognoz.Platform.Interop.Express;
Imports Prognoz.Platform.Interop.Report;
…
Public Shared Sub Main(Params: StartParams);
Var
MB: IMetabase;
RegRep: IPrxReport;
DataArea: IEaxDataArea;
DataAreaSlices: IEaxDataAreaSlices;
DataAreaSlice: IEaxDataAreaSlice;
Properties: IEaxDataAreaSliceProperties;
Slice: IEaxDataAreaSlice;
id: String;
i: integer;
Begin
// Get repository
MB := Params.Metabase;
// Get regular report
RegRep := MB.ItemById["REG_REPORT_SLICE"].Bind() As IPrxReport;
// Get collection of data slices
DataArea := RegRep.DataArea;
DataAreaSlices := DataArea.Slices;
// Display identifiers of slices parent objects to the console
For i := 0 To DataAreaSlices.Count - 1 Do
DataAreaSlice := DataAreaSlices.Item[i];
Properties := DataAreaSlice.Properties;
Slice := Properties.Slice;
id := Slice.Id;
System.Diagnostics.Debug.WriteLine
("Identifier of parent object of data slice = " + id);
End For;
End Sub;
See also: