Expression/expressions in the report generator
Reporting in Uniconta has now been simplified. Data is now passed to the report controls using expressions. This means that instead of using data bindings as in the previous version, reports now use expressions by default.
Previously, users had to manipulate scripts to implement custom logic in reports. This had security implications and required users to be familiar with C# programming. Expression binding now covers most scripting and makes it easier to calculate sums and formatting on a conditional basis. This allows end users to use expressions instead of writing code.
How do you use expressions in the report generator?
There are two ways to write expressions in Expression Editor.
The first way is to select the label and click the small arrow, as shown in the screenshot below. This opens the properties window for the selected label. Either select the property from the drop-down menu or click the '... ' icon as shown in the screenshot below to open the Expression Editor window.
The other way to write an expression is to select the label and click the 'Expression' icon circled in the 'properties' window below.
The user can now select properties for the expression, as shown in the screenshot.
The 'Text' property line shows [Text] as the expression. The selected label will now contain the value of 'Text Property Object (InvTransLines)' such as for an invoice. See screenshot.
Here the user can change the appearance and layout of the label etc.
The Expression Editor window can be opened by selecting Text and clicking the '... ' button, as shown in the screenshot above.
The Expression Editor will now open, as shown in the screenshot below.
Here the user can select the available 'Fields' by double-clicking on the fields. The selected field is then added to the expression in the top window.
The user can perform calculations on the field via the functions selected at the bottom left of the screen.
The user can also add report elements and variables that are available in the report.
The Expression Editor can also be used to specify a complex expression for two or more data fields, as shown in the screenshot below.
As shown in the Expression Editor below, a new sum category appears under 'Functions/Summary' where all 'sum' prefixes are listed. This is added to make it easier to differentiate aggregate functions from report sum functions.
All these expressions work by default for 'Before-print events'.
Reports containing standard bindings or legacy bindings can be converted to an expression binding report, but not vice versa.






