Creating a formula

To create a formula in catalog, follow the steps below:

  1. In JReport Designer, open the catalog to which you want to add the formula.
  2. In the Data tab of the Catalog Browser, expand the data source in which to create the formula, then right-click the Formulas node, and then select Add Formula from the shortcut menu.
  3. Enter a name for the formula in the Input Formula Name dialog and click OK. The Formula Editor window will then be displayed. See the window.
  4. Compose the formula by selecting the required fields, functions and operators from the Fields, Functions and Operators panels. You can also write the formula by yourself in the editing panel.
  5. To comment a line, click the Comment/Uncomment button on the toolbar.
  6. If you want to bookmark a line so that it can be searched easily later, click the Bookmark button .
  7. Click the Check button to check whether or not the syntax of your formula is correct.
  8. When done, click the OK button to add the formula.

See also Formula Editor window for detailed explanation about options in the window.

Notes: