EnableChecking: Boolean;
The EnableChecking property determines whether errors are checked and indicated in formulas.
Available values:
True. Formulas are checked and errors are indicated.
False. Formulas are not checked. Empty values are replaced with zeroes to calculate formulas.
To determine color of the indicator shown in cells which formulas contain errors, use the ITabErrorCheckingOptions.ErrorIndicatorsColor property.
Executing the example requires a regular report with the REGULAR_REPORT identifier.
Add links to the Metabase, Report, Tab, Drawing system assemblies.
Sub UserProc;
Var
MB: IMetabase;
Report: IPrxReport;
ErrOptions, Result: ITabErrorCheckingOptions;
Begin
MB := MetabaseClass.Active;
Report := MB.ItemById("REGULAR_REPORT").Edit As IPrxReport;
// == Parameters of error indication ==
ErrOptions := Report.Options.ErrorCheckingOptions;
// Errors are checked and indicated
ErrOptions.EnableChecking := True;
// Action to check formulas with links to empty cells
ErrOptions.EmptyValuesTreatmentType := TabEmptyValuesTreatmentType.AsZeroWithInfo;
// Indicator color
ErrOptions.ErrorIndicatorsColor := GxColor.FromName("Blue");
// Checking whether numbers in cells are text
ErrOptions.NumberAsText := True;
// Reset ignored errors
ErrOptions.ResetSkippedErrors;
// Filling parameters of errors indication
Result := ErrOptions;
ErrOptions.Assign(Result);
// Save report
(Report As IMetabaseObject).Save;
End Sub UserProc;
After executing the example, error indication parameters in table formulas are set up:
Checking and error indication is active.
Zero will be placed in formulas with links to empty values in order to calculate and error indicator will be displayed.
Numbers formatted as text will be marked as incorrect ones.
Skipped errors are reset.
See also: