Item(Index: Integer): IPrxTextField;
Item[System.Int32]: Prognoz.Platform.Interop.Report.IPrxTextField;
Index - index of the text field in the collection.
The Item property returns a text box by the specified index.
Executing the example requires a regular report with the Report identifier and Document1 text sheet created on it.
Sub UserProc;
Var
MB: IMetabase;
Report: IPrxReport;
Doc: IPrxDocument;
TFs: IPrxTextFields;
Tf: IPrxTextField;
i: Integer;
Begin
MB := MetabaseClass.Active;
Report := MB.ItemById("Report").Bind As IPrxReport;
Doc := Report.Sheets.FindByName("Document1") As IPrxDocument;
TFs := Doc.TextFields;
For i := 0 To TFs.Count - 1 Do
Tf := TFs.Item(i);
Debug.WriteLine(Tf.Name + ": " + Tf.Value);
End For;
End Sub Main;
After executing the example a list of all created text fields is displayed in the console.
Executing the example requires a regular report with the Report identifier and Document1 text sheet created on it.
Imports System.Diagnostics;
Imports Prognoz.Platform.Interop.Metabase;
Imports Prognoz.Platform.Interop.Report;
Public Sub Main(Params: StartParams);
Var
MB: IMetabase;
Report: IPrxReport;
Doc: IPrxDocument;
TFs: IPrxTextFields;
Tf: IPrxTextField;
i: Integer;
Begin
MB := Params.Metabase;
Report := MB.ItemById["REP1"].Bind() As IPrxReport;
Doc := Report.Sheets.FindByName("Document1") As IPrxDocument;
TFs := Doc.TextFields;
For i := 0 To TFs.Count - 1 Do
Tf := TFs.Item[i];
Debug.WriteLine(Tf.Name + ": " + Tf.Value);
End For;
End Sub;
After executing the example a list of all created text fields is displayed in the console.
See also: