IPrxFormulaIsland.Revert

Syntax

Revert;

Description

The Revert method cancels changes made in the formula area.

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(3,0);
    Formula.Origin := Range;
    // Undo changes in formula area
    Formula.Revert;
End Sub UserProc;

After executing the example the base cell of the formula area is replaced with the A3 cell, after which changes are undone.

See also:

IPrxFormulaIsland