Compartir a través de


Report Variables Dialog Box

The Report Variables dialog box makes it possible for you to create, change, or delete variables for a report or label. You can also change the order for evaluating report variables.

This dialog box appears when you choose Variables from the context menu of a report layout window or when you click Variables on the Report menu.

Note

Depending on the setting of the _REPORTBUILDER system variable, this dialog box may be replaced by an alternative user interface. For more information, see _REPORTBUILDER System Variable.

  • Variables
    Displays the names of variables defined in the report layout, and allows you to change the order of report variable evaluation by dragging the mover button.

  • Value to store
    Specifies an expression that is used to determine the value of the report variable during a report run. The report engine evaluates this expression each time it moves the record pointer as it processes the records in the current scope. Clicking the ellipsis (…) button opens the Expression Builder so you can build an expression. For more information, see Expression Builder Dialog Box.

  • Initial value
    Specifies an expression that is used to determine the initial value of the report variable. Clicking the ellipsis (…) button opens the Expression Builder. For more information, see Expression Builder Dialog Box.

  • Release after report
    Releases the report variable from memory after generating output for the report.

    Note

    When this option is not selected, the report variable remains in memory until Visual FoxPro quits or the CLEAR ALL or CLEAR MEMORY commands are called. For more information, see CLEAR Commands.

  • Reset based on
    Specifies the point at which to reset the variable to its initial value. The default value is End of Report.

    Note

    If you have specified data groups in the report, Detail bands, or target alias expressions for Detail bands, the Reset based on list displays those items.

  • Insert
    Inserts a blank text box in the Variables box so you can type a new variable name.

  • Delete
    Deletes the variable selected in the Variables box.

  • Calculate
    Specifies the type of calculation to perform when determining the next value of the report variable. Some calculation types are cumulative as the report engine moves the record pointer during a report run.

    Note

    Cumulative calculations are reset depending on the Reset value based on option.

    • None

      The result of the Value to store expression is assigned directly to the value of the report variable.

    • Count

      The value of the report variable is incremented by 1. (The Value to store expression is not evaluated.)

    • Sum

      Adds the result of the Value to store expression to the current value of the report variable.

    • Average

      Computes the arithmetic mean of the result of the Value to store expression for each record traversed thus far and assigns it to the report variable. (The Initial value of the report variable is not included in this calculation.)

    • Lowest

      Compares the current value of the report variable with the result of the Value to store expression and assigns the lesser of the two values to the report variable.

    • Highest

      Compares the current value of the report variable with the result of the Value to store expression and assigns the greater of the two values to the report variable.

    • Std Deviation

      Computes the square root of the variance of the result of the Value to store expression for each record traversed thus far and assigns it to the report variable. The Initial value of the report variable is not included in this calculation.

    • Variance

      Measures the degree to which the result of the Value to store expression varies from the average for the records traversed thus far and assigns it to the report variable. The Initial value of the report variable is not included in this calculation.

See Also

Tasks

How to: Define Report Variables

Concepts

Access to Visual FoxPro Variables and Fields

Reference

CLEAR Commands

Data Grouping Dialog Box

Expression Builder Dialog Box

Quick Report Dialog Box

Variables (Visual FoxPro)

Other Resources

Dialog Boxes (Visual FoxPro)