Report Variables

Report variables are used to display values based on data included in a report. You may enter multiple variables in order to have calculations performed successively (for example, a variable totaling the agency bill income for an agency and a variable totaling the direct bill income for an agency could be followed by a third variable combining the values for the first two to calculate total income).

To add report variables defined here to the report layout, select them from the Variables list on the Expression Builder screen during either of the following workflows:

To access the Report Variables window, from Report Designer, click Report, Variables.

  1. To define a variable, highlight the variable in the Variables list. (Initially, all entries in the list may be blank, as in the image above. Select the top row.) When a variable is selected, a double-sided arrow displays in the box to the left of the variable name.
  2. Type the variable name.
  3. Enter the Value to store for this variable. This determines how the value of the variable will be calculated and in many cases will be in the form of a mathematical equation. To use an expression to define the value, click the ellipsis button to the right of the Value to store field to open Expression Builder.

    Note: Rather than clicking the ellipsis to open Expression Builder, you could type the name of the field in the space available. The file structure for your report provides you with a list of available field names. You can link field names with + or - signs if you wish to calculate the variable based on the values of multiple fields.
  4. Enter the Initial value for this variable. This determines the value that will be assigned to the variable at the beginning of the report run. In many cases, the value will be 0, but you can also type a field name (for example, if you wished to use an account's beginning balances as an initial value when running an accounting report). To use an expression to define the value, click the ellipsis button to the right of the Initial value field to open Expression Builder.
  5. Check Release after report if applicable. If you do not select this option, the report variable will be retained after output for the report is generated; if you do, it will be deleted.
  6. Select the appropriate option from the Reset at dropdown list:
  7. In the Calculate frame, determine whether any additional calculations should be performed before the variable value is assigned.
  8. To move a variable in the Variables list, click and drag the box displaying the double-sided arrow.

    Note: If variable A is used to calculate the value for variable B, variable A must be listed before variable B. The order in which the variables are listed determines the order in which they are calculated.

    To insert a variable above the currently selected variable, click Insert.

    To remove the selected variable from the Variables list, click Delete.
  9. When you have finished revising variable information, click OK.