ITabSheet.EnableFormulas

Syntax

EnableFormulas: Boolean;

Description

The EnableFormulas property determines whether formulas are calculated in cells.

Comments

Available values:

Example

Executing the example requires containing a regular report with the Reg_rep identifier.

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

Sub UserProc;
Var
    MB: IMetabase;
    MObj: IMetabaseObject;
    Rep: IPrxReport;
    Tab: ITabSheet;
    Sheet: IPrxTable;
Begin
    MB := MetabaseClass.Active;
    MObj := MB.ItemById("Reg_rep").Edit;
    Rep := MObj As IPrxReport;
    Sheet := Rep.Sheets.Item(0As IPrxTable;
    Tab := Sheet.TabSheet;
    Tab.Cell(00).Value := 10;
    Tab.Cell(01).Value := 20;
    Tab.Cell(02).Value := 30;
    Tab.EnableFormulas := True;
    Tab.Cell(10).Formula := "=A0+B0";
    Tab.Cell(11).Formula := Tab.AdjustFormula(Tab.Cell(10).Formula, Tab.Cell(10), Tab.Cell(11));
    MObj.Save;
End Sub UserProc;

After executing the example the formula that sums values of the A0 and B0 cells is set for the A1 cell. Then this formula is corrected for the B1 cell.

See also:

ITabSheet