DataRange: ITabRange;
DataRange: Prognoz.Platform.Interop.Tab.ITabRange;
The DataRange property returns range of the cells containing data.
When the data area heading or sidehead is deselected, DataRange = 0.
Executing the example requires a regular report with the REPORT identifier.
Add links to the Metabase, Report, Tab system assemblies.
Sub UserProc;
Var
MB: IMetabase;
Report: IPrxReport;
DIs: IPrxDataIslands;
DI: IPrxDataIsland;
Begin
MB := MetabaseClass.Active;
Report := MB.ItemById("REPORT").Bind As IPrxReport;
DIs := Report.DataIslands;
DI := DIs.Item(0);
Debug.WriteLine("Cell range, in which data area is located: " + DI.Range.Address);
Debug.WriteLine("Range of cells, containing data: " + DI.DataRange.Address);
Debug.WriteLine("Number of cells, containing data: " + DI.DataRange.Count.ToString);
End Sub UserProc;
After executing the example the console window displays the key of the relational data area:
Cell range, in which data area is located.
Range of cells containing data.
Number of cells containing data.
The requirements and result of the Fore.NET example execution match with those in the Fore example.
Imports Prognoz.Platform.Interop.Report;
…
Public Shared Sub Main(Params: StartParams);
Var
MB: IMetabase;
Report: IPrxReport;
DIs: IPrxDataIslands;
DI: IPrxDataIsland;
Begin
MB := Params.Metabase;
Report := MB.ItemById["REPORT"].Bind() As IPrxReport;
DIs := Report.DataIslands;
DI := DIs.Item[0];
Debug.WriteLine("Cell range, in which data area is located: " + DI.Range.Address);
Debug.WriteLine("Range of cells, containing data: " + DI.DataRange.Address);
System.Diagnostics.Debug.WriteLine("Number of cells, containing data: " + DI.DataRange.Count.ToString());
End Sub;
See also: