Calculator

Print Previous page Top page Next page

ici_9136 Calculator allows to make calculations, using mathematical expressions and data from numeric fields of a data set.

Properties of a component are the followings: Font, Height, Hint, Left, Name, Show hint, Top, Width.

Auto calculation - the property defines if it needs to make automatic recalculation of mathematical expression at change of the data. If the property has False value the recalculation is made only in case of pressing the button to the right of calculator string.

The mathematical expressions with usage of numeric fields of active data sets are assigned by Expression editor. The editor is called through a value field of Expression object's property in Object inspector.

Expression editor contain three lists: Datasets, Fields, Operators and functions:

- Datasets - include names of active datasets (names of all components - data sources, which are arranged on the form);

- Fields - contains fields names of a selected data set;

- Operators and functions - contains the list of mathematical operators and functions.

 In the Expression window the mathematical expression, which was compounded by user is displayed.

For example, to find the values sum of two numeric fields of a data set it is necessary:

- Mark a required data set in the Datasets list. The Fields list of a selected data set will be formed automatically.

- Select a demanded field (maiden addend) from the Fields list by double mouse button click.

- Select operator " +" by double mouse button click.

- Select an augend from the Fields list by double mouse button click.

Note 1: There should not be blanks in mathematical expression.

Note 2: It is impossible to use mathematical functions except of those, which are predetermined in the Expression editor.