IPrxTextFields.Item

Fore Syntax

Item(Index: Integer): IPrxTextField;

Fore.NET Syntax

Item[System.Int32]: Prognoz.Platform.Interop.Report.IPrxTextField;

Parameters

Index - index of the text field in the collection.

Description

The Item property returns a text box by the specified index.

Fore Example

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.

Fore.NET Example

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:

IPrxTextFields