Add : IPrxTableIslandLayoutRow;
The Add method adds a row to the layout.
Sub Main;
Var
MB: IMetabase;
MObj : IMetabaseObject;
Report : IPrxReport;
TabIs : IPrxTableIslands;
TI : IPrxTableIsland;
Range : ITabRange;
Layout : IPrxTableIslandLayout;
Row : IPrxTableIslandLayoutRow;
Cell : IPrxTableIslandLayoutCell;
Begin
MB := MetabaseClass.Active;
MObj := MB.ItemById("Report").Edit;
Report := MObj As IPrxReport;
TabIs := Report.TableIslands;
TI := TabIs.Add;
TI.Source := Report.TableSources.Item(0);
TI.Sheet := Report.Sheets.Item(0);
TI.AdjustMode := PrxAdjustMode.Columns;
Range := (TI.Sheet As IPrxTable).TabSheet.Cell(1,1);
TI.Range := Range;
Layout := TI.Layout;
Row := Layout.Add;
Row.Height := 30;
Cell := Row.Add;
Cell.Field.FieldName := "ID";
Cell := Row.Add;
Cell.Field.FieldName := "NAME";
TI.Save;
MObj.Save;
End Sub Main;
After executing the example a relational data area with the specified parameters is added to the sheet of the regular report. Report - identifier of a regular report.
See also: