IDtProvider.CalcFieldsErrors

Fore Syntax

CalcFieldsErrors: IDtCalcFieldErrors;

Fore.NET Syntax

CalcFieldsErrors: Prognoz.Platform.Interop.Dt.IDtCalcFieldErrors;

Description

The CalcFieldsErrors property returns a collection of errors appeared on calculated fields calculation.

Comments

Errors can be obtained only after calling one of the following methods: IDtProvider.Fetch, IDtProvider.FetchRows.

Fore example

Executing the example requires the c:\Import Text.txt file with data in the file system.

Add links to the Dal, Dt, Metabase system assemblies.

Contents of the c:\Import Text.txt file

Sub UserProc;
Var
    DTProvider: IDtTextProvider;
    Errors: IDtCalcFieldErrors;
    Error: IDtCalcFieldError;
    fields: IdtFieldDefinitions;
    field: IdtFieldDefinition;
    i: Integer;
    v: Array;
    data: Variant;
    Text: String;
Begin
    // Create data source
    DTProvider := New DtTextProvider.Create;
    // Set source basic parameters
    DTProvider.FormatType := DtTextFormatType.Delimited;
    DTProvider.RangeHasHeader := True;
    DTProvider.AutoFillFieldsMode := DtAutoFillFieldsMode.DataRow;
    DTProvider.TypeGuessRows := 10;
    DTProvider.Metabase := MetabaseClass.Active;
    DTProvider.DelimitedColumnDelimiter := ";";

As a result of executing the example data will be loaded from the c:\Import Textt.txt file. The calculated field with the following expression will be created: value of the field with the 1 index from the data source will be increased by six. The results will be displayed to the console. If on formula calculation there are any errors, it will be displayed to the console.

Fore.NET Example

The requirements and result of the Fore.NET example execution match with those in the Fore example.

Public Shared Sub Main(Params: StartParams);
Var
    DTProvider: IDtTextProvider;
    Errors: IDtCalcFieldErrors;
    Error: IDtCalcFieldError;
    fields: IdtFieldDefinitions;
    field: IdtFieldDefinition;
    i: Integer;
    v: Array;
    data: object;
    Text: String;
Begin
    // Create data source

See also:

IDtProvider