IPrxFormulaIsland.Edit

Syntax

Edit: IPrxFormulaIsland;

Description

The Edit method opens a formula area for edit.

Example

Executing the example requires that the repository contains a regular report with the REPORT identifier that contains a formula area.

Add links to the Metabase, Report and Tab system assemblies.

Sub UserProc;
Var
    MB: IMetabase;
    MObj: IMetabaseObject;
    Report: IPrxReport;
    FormulaIs: IPrxFormulaIslands;
    Formula: IPrxFormulaIsland;
    FSheet: IPrxSheet;
    FSheetTab: IPrxTable;
    Table: ITabSheet;
    Range: ITabRange;
Begin
    MB := MetabaseClass.Active;
    // Get regular report
    MObj := MB.ItemById("REPORT").Edit;
    Report := MObj As IPrxReport;
    // Get formula area
    FormulaIs := Report.FormulaIslands;
    Formula := FormulaIs.Item(0);
    // Change basic cell of formula area
    Formula := Formula.Edit;
    FSheet := Formula.Sheet;
    FSheetTab := FSheet As IPrxTable;
    Table := FSheetTab.TabSheet;
    Range := Table.Cell(1,0);
    Formula.Origin := Range;
    // Save changes in formula area
    Formula.Save;
    // Calculate formula area
    Formula.Recalc;
    // Save changes in report
    MObj.Save;
End Sub UserProc;

After executing the example the base cell of the formula area is replaced with the A1 cell.

See also:

IPrxFormulaIsland