Variables
Global variables are available throughout a report catalog. Report variables are available only in the report in which they are created. We recommend that, if possible, you use report variables rather than global variables. Using report variables keeps the Global Variables folder free of variables of which the purpose is not clear. Action local variables are temporary variables that can be used to store intermediate results, static values, or the results of pre-calculated formulas in action definitions. Action local variables exist only during an action's execution. Use action local variables as an alternative to creating report variables that have a temporary purpose but which exist permanently in the report catalog.
Report snapshots store only report variables. If the report uses global variables, the snapshot may not display the data you expect.
Global variables allow users to interact with a group of reports as a whole, instead of with a set of individual reports. But, you may sometimes want to present reports in a variety of different states. Report variables allow you to do this. You can copy report variables into separate reports and set their values individually.
Global and report variables can have these values:
- A value for the current user
- A default value
- A value for a specified user or role
The variable definition consists of name, description, the value of persistent, and the default value for the variable.
You can display the current value of a variable in a report with this syntax:
=variablename.text
Both types of variable are displayed in the Accessories pane of the Application Explorer.