Enhancing Reports using Formulas and Variables


After completing this lesson, you will be able to:

  • Implement formulas and variables

Edit variables

When you select a variable in the Main Side PanelObjects tab, you can check its properties (name, qualification, description, and formula) in the Build Side PanelProperties tab and modify them on the fly without opening the Formula Editor. Once you have changed a property, click the Apply button to validate them.

If the text field is too small to display the formula, you can open the Formula Editor by right clicking the variable and selecting the Edit Variable command, or by clicking the Display the Formula Editor button near the formula in the Build Side PanelProperties tab.

Watch this video to learn how to create variables:

Formula editor

The Formula Editor has been improved to simplify formula edition with a more powerful code editor:

  • The Objects, Functions and Operators panels have been moved to the right. This leaves more space to display the list in these panels and the Formula field.
  • Syntax analysis is applied on the fly: the strings in the formulas are colored depending on their type: functions, objects, strings, comments… Unrecognized parts are underlined in red.
  • Formulas are displayed using a mono-space font to improve readability.
  • When you move the cursor behind a parenthesis, the pairing parenthesis is highlighted.
  • Line numbers are displayed in the Formula Text field.
  • When hovering the mouse over an object or a function in the panels, a tooltip displays the object properties or the function help.
  • To create more readable and maintainable formulas, you can use the classic comments usually supported by most programming languages in the formula language. To comment the end of a line, you may use//and to comment a block in the formula, you may use/* */

Shortcuts are supported in the Formula text field:

  • On Windows:
    • [Ctrl]+[Z], [Ctrl]+[Y] to undo and redo.
    • [Ctrl]+[X], [Ctrl]+[C], [Ctrl]+[V]to cut, copy and paste content.
  • On IOs
    • [Cmd]+[Z], [Cmd]+[Shift]+[Z]: to undo and redo.
    • [Cmd]+[X], [Cmd]+[C], [Cmd]+[V]: to cut, copy and paste content.

Log in to track your progress & complete quizzes