Help Center

# Expression Builder

Expression Builder Interface

With expression builder you can specify parameters, arithmetic expressions and references to object properties for the selected cell.

You can open expression builder for a table cell and for the Attach object dialog box. Press Shift + F2 to open the dialog box. In the top part of the dialog box there is a field to enter any arithmetic expressions and use any constants and object properties.

During input, in the list of functions and constants, all items containing input are displayed. If the input is incorrect, a message about the error or a tooltip will be displayed. Click in the preview and the expression in the input field will be selected. Press the button and the entered expression will be saved on the template formula bar. Expressions from the formula template bar are marked with a star in the list of functions and constraints.

Formula Templates

These allow expressions to be saved in templates for further use.

To save an expression, type it in the field and select the button. The expression’s button will be displayed in the templates list.

There is a tooltip when you move the cursor over the item. To insert a template, select the button of the saved template.

To delete a template, press the Alt button and drag the template button outside the Expression builder dialog box If there are “\$” symbols in the template, after insertion they are changed to the selected text. For example, we create the Iff(Exist(\$);\$;””) template then type the text Object.Name, select it and insert the Iff template and the symbols are changed to the text -  Iff(Exist(Object.Name;Object.Name;””).

Snap to objects - opens the Attach object dialog box.

Functions in the Expression Builder

Mathematical operations:

 + Addition - Subtraction * Multiplication / Division ^ Raising to the power sqrt() Square-root generation

Logical operations:

 == equals > more < less ! nor | or != not equals >= not less <= not more || or && and

Functions:

Mathematical:

 Cos, Sin, Tg - Trigonometric function; argument is specified in degrees. Acos, Asin, Atg - Arc trigonometric functions, the result received in degrees. Abs - Modulus. Int - Rounding of number. Summ - Returns the sum of the variables values if the cells are grouped note! When entering a function, pay attention to brackets. For example: Summ(Row) - returns the sum of the numbers of grouped rows. Summ(Detal.L) - returns the sum of the parameter L values of the “Detail” object in grouped rows.

Data conversion:

 Str - Data conversion to string type. Num - Data conversion to numeric type. Frm - Numerical value conversion to string type according to the parameters of the table column. For example: Frm(0.001230) returns 0.0012 string if zero suppression mode and 0,0000 accuracy are set for the column containing the cell.

Selection and comparing:

 FmtText - Addition of formatted strings. FmtSub - Creation of lower index. FmtSuper - Creation of upper index. FmtDigit - Number conversion to typesetting form. FmtRaw - Not formatted text. FmtDiv - Creation of fraction. If/Iff - function of logical decision. Format: if(Logical_Condition; If_True; If_False, where: Logical_Condition – logical condition with logical operations for comparing; If_True – returned value, if logical condition is held; If_False - returning value, if logical condition is not held. For example: if(object == Marker; Marker.Position; "Not determined"). If the object type attached to the column cell has a Marker value, the function returns its Position value.  If the object has another type, the Not determined value is returned. Exist Checks the existence of a constant: =IF(EXIST(Object.Name);Object.Name;0) Min/Max - Returns the minimum/maximum value listed in the brackets. For example: Min(maximum_value; minimum_value) – returns minimum_value; Max(maximum_value; minimum_value) - returns maximum_value. Count - Returns the number of objects (for grouped rows of a table). For example: Count() - returns number of objects attached to the cells of the grouped rows. Avg - Calculates arithmetical average of arguments. It can use any number of arguments of any ranges. Null arguments are not used. Off - Returns a cell value, specified by a relative index. The index format is: Off(row; column) For example: Off(-1;2) - returns the cell value located one row above and two columns to the right of the current cell. Cell - Returns the cell value specified by an absolute index. Merge (Cells,Expression) - Merges the Cells in a range. If the Expression is not equal to zero, it returns the Expression value. For example: =merge(A5:C5; "Name") – merges cells from A5 to C5 and in the results cell, the “Name” text is displayed. SetHeight() – Specifies the column height. Height value is specified in brackets. Val() - Calculated argument. For example: =val("A"+"1") - calculates "A1", and uses it as an expression (value in A1 cell). If argument is not a row, it is returned. =val(10+2) – is the same as =10+2. =val("summ(A"+Str(off(0;-1))+":D"+Str(off(0;-1))+")") - sum of cells from A to D of row, whose number is in the cell to the left of the current one. In general, you can do without val. It is needed when you have to enter a cell address in user form to take the value from it further. Create the Addr variable, attach it to the input field in the form and enter in the table: =val(Addr). Function allows recurrence: =val(val("A"+"1")) - takes its value from the cell whose address is in cell A1. Number of enclosures is limited to 64. Geometry(Object) - Works as Attach object . The height of the attached object is fitted to the cell height. The object is taken from the report and attached to the cell. SUMM(Section(-1)) - Sum of the current column’s cells in the section, following after the current section. COUNT(Section(A3)) - Number of rows in the section containing cell A3.

Reserved variables:

 Pi - Pi character. Row - Returns the row number for every cell (rows are numbered from 1, the header row is not numbered). Col - Returns the column number for every cell (column “A” is number 1). Object - Returns the object type, attached to row cells. Object1, Object2, … - Objects attached to the cell. Title - Table name. RowCount - General number of rows. ColCount - General number of columns.