Show contents 

Report > Report Assembly Interfaces > IPrxTableIslandField > IPrxTableIslandField.FieldName

IPrxTableIslandField.FieldName

Syntax

FieldName: String;

Description

The FieldName property determines binding of a cell to a field of the relational source.

Example

To execute an example, add links to the Report, Metabase and Tab system assemblies. The example requires a regular report with the RR identifier and a table added to data sources. A table must contain the ID and NAME fields.

Sub UserProc;
Var
    Report: IPrxReport;
    MB: IMetabase;
    TI: IPrxTableIsland;
    Range: ITabRange;
    Layout: IPrxTableIslandLayout;
    Row: IPrxTableIslandLayoutRow;
    Cell: IPrxTableIslandLayoutCell;
Begin
    MB := MetabaseClass.Active;
    Report := MB.ItemById("RR").Edit As IPrxReport;
    TI := Report.TableIslands.Add;
    TI := TI.Edit;
    TI.Source := Report.TableSources.Item(0);
    TI.Sheet := Report.Sheets.Item(0);
    Range := (TI.Sheet As IPrxTable).TabSheet.Cell(101);
    TI.Range := Range;
    Layout := TI.Layout;
    Row := Layout.Add;
    Cell := Row.Add;
    Cell.Field.FieldName := "ID";
    Cell.Field.Caption := "ID";
    Cell := Row.Add;
    Cell.Field.FieldName := "NAME";
    Cell.Field.Caption := "NAME";
    Cell := Row.Add;
    Cell.Field.Expression.AsString := "NAME + ID";
    Cell.Field.Caption := "More";
    TI.Save;
    Report.Recalc;
    (Report As IMetabaseObject).Save;
End Sub UserProc;

After executing the example a relational data area is created and layout parameters are set up. The relational area is located in the cell range, starting from the (10,1) cell. The area contains 3 columns:

See also:

IPrxTableIslandField