Selecting Members by Using Substitution Variables

Substitution variables act as global placeholders for information that changes regularly; you set the substitution variables on the server through Administration Services, MaxL, or ESSCMD, and assign a value to each variable. You can then change the value anytime, reducing manual changes to a report script. You must have the role of at least Database Manager to set substitution variables.

For example, many reports are dependent on reporting periods; if you generate a report based on the current month, you must manually update the report script every month. With a substitution variable set on the server, such as CurMnth, you can change the assigned value each month to the appropriate time period. Essbase dynamically updates the information when you run the final report.

See Using Substitution Variables for a comprehensive discussion about creating and changing substitution variables in the database outline. For information about the leading & character, see the Oracle Essbase Technical Reference.

You can set substitution variables at the following levels:

  To use a substitution variable, at the point in the script where you want to use the variable, use the format:

&variableName

where variableName is the same as the substitution variable set on the server.

For example,

<ICHILDREN &CurQtr

becomes

<ICHILDREN Qtr1

Note:

The substitution variable must be accessible from the application and database against which you are running the report. Also, the variable name can be an alphanumeric combination (for variable name size limit, seeLimits). You cannot use spaces or punctuation in the variable name.

When you run the report script, Essbase replaces the variable name with the substitution value, and that information is incorporated into the final report.