Using the expression builder

Top  Previous  Next  

 

The expression builder allows you to build calculated fields, either for stand-alone fields or for summary fields, gauges or traffic lights. The syntax of the expression must be Windows Scripting  VBScript format. For more details on the syntax of VBScript, see Windows Script 5.6 Documentation.

 

For details on returning one of two values based on a logical expression (if, then, else), see using the IIF function.

 

 

The expression builder contains three key sections.

 

The expression panel contains the current VBScript expression you are building. You can type free text in here to build your expression, or use the operator buttons and scripting elements tree view to generate your expression.

 

The operator buttons provide quick access to common operators used in VBScript expressions. Simply press a button to add a required operator to your expression.

 

The scripting elements tree view provides access to a wide range of script elements, described in detail below.

clip326

 

Scripting Elements Tree View

 

The Database Fields branch of the scripting elements tree view allows you to add fields from your query to an expression. To add a field, expand the tree view until you see the field you require, then click on the field in the tree view. This will enter the field into your expression in the expression panel at the current cursor point.

clip327

 

The Summary Fields branch of the scripting elements tree view allows you to add summary fields from your  report to an expression. To add a summary field, expand the tree view until you see the summary field you require, then click on the summary field in the tree view. This will enter the summary field into your expression in the expression panel at the current cursor point.

clip328

 

The Calculated Fields branch of the scripting elements tree view allows you to add existing calculated fields from your report to an expression. To add a calculated field, expand the tree view until you see the calculated field you require, then click on the calculated field in the tree view. This will enter the calculated field into your expression in the expression panel at the current cursor point.

clip329

 

The Operators branch of the scripting elements tree view allows you to add VBScript operators to an expression.

 

Operators allow you to compare and combine one or more values in your expression. For more details on the usage of VBScript operators, see Windows Script 5.6 Documentation.

 

To add an operator, expand the tree view until you see the operator you require, then click on the operator in the tree view. This will enter the operator into your expression in the expression panel at the current cursor point.

clip330

 

The functions branch of the scripting elements tree view allows you to add VBScript functions to an expression.

 

Functions perform a specific task and return a single value. For more details on the usage of VBScript functions, see Windows Script 5.6 Documentation.

 

To add a function, expand the tree view until you see the function you require, then click on the function in the tree view. This will enter the function into your expression in the expression panel at the current cursor point.

clip331


Copyright © 2003-2017 DataPA Limited, all rights reserved. DataPA OpenAnalytics 6.0