Expression Binding
Reporting in Uniconta has now been simplified. Data is now provided to report controls using ‘expression binding’. This means that, instead of using data bindings, as in the previous version, reports now use expressions by default.
Previously, end-users needed to manipulate script in order to implement custom logic in reports. This had security implications and required users to be familiar with c# programming language. The use of expression binding, now covers most scripting and makes it easier to calculate summary results and formatting on a conditional basis. This enables end-users to internalise expression criteria syntax, instead of writing code.
Writing expressions
There are two ways to write expressions in the Expression Editor. The first way is to select the label and click on the small arrow icon, as shown in the screenshot below. This opens the window. Either select the property from the drop down menu or click the ‘…’ icon shown in the screenshot below to open the Expression Editor window.
The second way to write an expression is to select the label and click on the new expression icon, circled in the properties window below.
The user can now select properties for the expression, as shown in the screenshot below.
The ‘Text’ property line shows [Text] as the expression. The selected label will now contain the value of the
‘Text Property of Object(InvTransLines )’ e.g. for an Invoice. See screenshot below.
The user can change the appearance and layout of the label etc. here.
The Expression Editor window can be opened by selecting any row and clicking the ‘…’ button shown in the screenshot below.
The ‘Expression Editor’ will now open, as shown in the screenshot below.
Here, the user can select the available ‘Fields’ by double clicking the field. The selected field will then be added to the top panel.
The user can perform calculations on the field, since it contains aggregate functions.
The user can also add report items and variables that are available in the report, such as a style sheet.
The Expression Editor can also be used to specify a complex binding expression of two or more data fields, as shown in the screenshot below.
As shown in the Expression Editor screenshot below, a new summary category will appear under ‘Functions/Summary’ where all ‘sum’ prefix’s are listed. This is added to make it easier to differentiate aggregate functions from report summary functions.
All these expressions are evaluated prior to printing.
Reports that contain standard bindings or legacy bindings can be converted to a expression binding report, but not vice-versa.