Field : IPrxTableIslandField;
The Field property determines binding of a cell to a relational data source field.
Sub Main;
Var
MB: IMetabase;
MObj : IMetabaseObject;
Report : IPrxReport;
TabIs : IPrxTableIslands;
TI : IPrxTableIsland;
Layout : IPrxTableIslandLayout;
Row : IPrxTableIslandLayoutRow;
Cell : IPrxTableIslandLayoutCell;
SourceFields : IDalCursorFields;
Begin
MB := MetabaseClass.Active;
MObj := MB.ItemById("Report").Edit;
Report := MObj As IPrxReport;
TabIs := Report.TableIslands;
TI := TabIs.Item(0);
TI := TI.Edit;
Layout := TI.Layout;
Row := Layout.Rows(0);
Cell := Row.Cells(1);
SourceFields := Report.TableSources.Item(0).Execute.Fields;
Cell.Field.FieldName := SourceFields.Item(0).Name;
TI.Save;
MObj.Save;
End Sub Main;
After executing the example binding of the selected layout cell to the data source is changed. Report - identifier of the regular report, which sheet contains a relational data area.
See also: