ErrorCheckingOptions: ITabErrorCheckingOptions;
ErrorCheckingOptions: Prognoz.Platform.Interop.Tab.TabErrorCheckingOptions;
The ErrorCheckingOptions property returns parameters of error indicating in table formulas.
Use the ITabErrorCheckingOptions.EnableChecking property to check whether error checking and indicating in formulas is done.
To execute the example a regular report with the REGULAR_REPORT identifier is required.
Add links to the Metabase, Report and Tab system assemblies.
Sub UserProc;
Var
MB: IMetabase;
Report: IPrxReport;
tabSheet: ITabSheet;
Sheet: IPrxTable;
Begin
MB := MetabaseClass.Active;
Report := MB.ItemById("REGULAR_REPORT").Edit As IPrxReport;
Sheet := Report.Sheets.Item(0) As IPrxTable;
tabSheet := Sheet.TabSheet;
tabSheet.ErrorCheckingOptions.EnableChecking := True;
tabSheet.ErrorCheckingOptions.EmptyValuesTreatmentType := TabEmptyValuesTreatmentType.AsZeroWithInfo;
tabSheet.ErrorCheckingOptions.NumberAsText := True;
tabSheet.Recalc;
(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.
The numbers formatted as text are not marked as incorrect ones.
The requirements and result of Fore.NET Example execution match with those in the Fore Example.
Imports Prognoz.Platform.Interop.Report;
Imports Prognoz.Platform.Interop.Tab;
…
Public Shared Sub Main(Params: StartParams);
Var
MB: IMetabase;
Report: IPrxReport;
tabSheet: ITabSheet;
Sheet: IPrxTable;
Begin
MB := Params.Metabase;
Report := MB.ItemById["REGULAR_REPORT"].Edit() As IPrxReport;
Sheet := Report.Sheets.Item[0] As IPrxTable;
tabSheet := Sheet.TabSheet;
tabSheet.ErrorCheckingOptions.EnableChecking := True;
tabSheet.ErrorCheckingOptions.EmptyValuesTreatmentType := TabEmptyValuesTreatmentType.tevttAsZeroWithInfo;
tabSheet.ErrorCheckingOptions.NumberAsText := True;
tabSheet.Recalc();
(Report As IMetabaseObject).Save();
End Sub;
See also: