IDtProvider.CalcFieldsErrors

Syntax

CalcFieldsErrors: 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.

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.

See also:

IDtProvider