/
Fields Section

Fields Section

The Fields Section allows managing report data sources, calculated fields and parameters. The Field Sections displays data sources available for the report and all fileds that correspond the data sources. Calculated fields and parameters can be added manually to the Field Section.

Add Report Data Source

By default, there is no data source in the report. To add data source the Query Builder Wizard is used. To add a data source the following set of actions should be done:

  1. Select the Add Data Source option in the Fields Section.

  2. Specify Data Source Sorce. As a source of data can be used the following:

    1. Tables. All tables belonged to the project database

    2. View. All dictionaries presented in the project database

    3. Queries. All custom queries are created by the user.

  3. Specify the list of columns that belong to Table, View, or Query. The list of resulting columns is used as data source fields to provide report detail.

 

 

CreateDataSource.mp4

Expression Editor

The Expression Editor is a graphical interface that allows creating and editing expressions. The Editor lists all properties for which the expression can be applied. The properties are listed in the rigth-side bar.

The report items section includes Fields generated by Data Source and Parameters, series of Constraints may be applied to the fields, list of functiona and operators can be applied to the fileds and list of variables.

image-20241017-214641.png

 


Expression Syntax

An expression string can consist of multiple lines that include constants, operators, function calls, fields or parameters, report items, and comments:

Iif ( [Code] == 'C', True, False ) /*This expression is set for the Visible property of a control to show/hide the control based on the Code parameter value.*/

The following constans and operators is used in Expression Editor to constract expression

Constant

Description

Example

Constant

Description

Example

String constants

Wrap string constants in apostrophes.

If a string contains an apostrophe, double the apostrophe.

[Country] == ‘France’

[Name] == ‘O’’Neil’

Date-time constants

Wrap date-time constants in ‘#’

[OrderDate] >= #2018-03-22 13:18:51.94944#

True/False

The Boolean True value/ The Boolean False value

[InStock] == True/[InStock] == False

Operator

Description

Example

+

Adds the value of one numeric expression to another or concatenates two strings

[UnitPrice] + 4

[FirstName] + ‘ ‘ + [LastName]

-

Finds the difference between two operands

[Price1] - [Price2]

*

Multiplies the value of two operands

[Quantity] * [UnitPrice]

/

Divides the first operand by the second.
If both operands are integer, the resulting value is integer too. For example, 10/4 returns the value of 2.
To return fractional values, ensure that at least one operand is of a floating-point type: ToDecimal(10)/4 returns the value of 2.5

[Quantity] / 2

%

Divides one numeric operand by the other and returns the remainder (modulus)

[Quantity] % 3

|

Performs a bitwise inclusive OR operation on two numeric expressions. Compares each bit of its first operand to the corresponding bit of its second operand. If either bit is 1, the corresponding resulting bit is set to 1. Otherwise, the corresponding resulting bit is set to 0.

[Number] | [Number]

&

The bitwise AND operator. Compares each bit of its first operand to the corresponding bit of its second operand. If the two bits are 1, the corresponding resulting bit is set to 1. Otherwise, the corresponding resulting bit is set to 0.

[Number] & 10

^

Performs a bitwise exclusive OR operation on two numeric expressions.

[Number] ^ [Number]

==

=

Returns True if both operands are equal; otherwise, it returns False.

[Quantity] == 10

!=

Returns True if the operands are not equal; otherwise, it returns False.

[Country] != ‘France’

<

Less than operator. Used to compare expressions.

[UnitPrice] < 20

<=

Less than or equal to operator. Used to compare expressions.

[UnitPrice] <= 20

>=

Greater than or equal to operator. Used to compare expressions.

[UnitPrice] >= 20

>

Greater than operator. Used to compare expressions.

[UnitPrice] > 20

In (,,,)

Tests for the existence of a property in an object.

[Country] In (‘USA’, ‘UK’, ‘Italy’)

Between (,)

Specifies a range to test. Returns True if a value is greater than or equal to the first operand and less than or equal to the second operand.

[Quantity] Between (10, 20)

And

&&

Performs a logical conjunction on two Boolean expressions.

[InStock] And ([ExtendedPrice]> 100)

[InStock] && ([ExtendedPrice]> 100)

Or

||

Performs a logical disjunction on two Boolean expressions.

[Country]==’USA’ Or [Country]==’UK’

[Country]==’USA’ || [Country]==’UK’

~

Performs a bitwise negation on a numeric expression.

~[Roles] = 251

Not

!

Performs a logical negation on a Boolean expression.

Not [InStock]

![InStock]

+

Returns a numeric expression’s value (a unary operator).

+[Value] = 10

-

Returns the negative of a numeric expression’s value (a unary operator).

-[Value] = 20

Is Null

Returns True if an expression is a null reference (one that does not refer to any object).

[Region] is null

Operator Precedence

When an expression contains multiple operators, these operators are evaluated in the following sequence:

  • Literal values

  • Parameters

  • Identifiers

  • OR (left-associative)

  • AND (left-associative)

  • The ‘.’ relationship qualifier (left-associative)

  • ==, !=

  • <, >, <=, >=

  • -, + (left-associative)

  • *, /, % (left-associative)

  • NOT

  • Unary -

  • In

  • Iif

  • Trim(), Len(), Substring(), IsNull()

  • ‘[]’ (for set-restriction)

  • ‘()’

Group elements with parentheses to change operator precedence. For instance, operators are applied in the default order in the following expression:

Accounts[Amount == 2 + 48 * 2]

In the next expression, the addition operation is applied first, because its associated elements are grouped with parentheses, and the multiplication operation is applied last.

Accounts[Amount == (2 + 48) * 2]

Aggregate Functions

Name

Description

Name

Description

Exists

Determines whether the object exists in the collection.

Count

Returns the number of objects in the collection.

Max

Returns the maximum expression value in the collection.

Min

Returns the minimum expression value in the collection.

Avg

Evaluates the average of the values in the collection.

Sum

Returns the sum of all the expression values in the collection.

Single

Returns a single object from the collection. The collection must contain no more than one object.

Group Summary Functions

The group summary functions allows applying running summary to the group or pages in Report builder.

Name

Description

Name

Description

sumAvg()

The sumAvg() function returns the average of a collection of numeric values in a specified group of the report.

sumCount()

The sumCount() function returns the number of record of a collection of numeric values in a specified group of the report.

sumSum()

The sumSum() function returns the sum of a collection of numeric values in a specified group of the report.

sumMax()

The sumMax() function returns the max value of a collection of numeric values in a specified group of the report.

sumMin()

The sumMin() function returns the min value of a collection of numeric values in a specified group of the report.

SumMedian()

The sumMedian() function returns the the middle value of a collection of numeric values in a specified group of the report.

 

Related content

Expression Section
Expression Section
More like this
Creating Query Parameters
Creating Query Parameters
More like this
Bind a Report to Data
Bind a Report to Data
More like this