Report variables
Learn how to use report variables and objects to create reusable, predefined formulas in Report Designer.
Overview
When modifying a standard or new custom report, you can create a report variable. Report variables allow you to:
- Create reusable, predefined formulas using report objects
- Run a formula in Report Designer instead of exporting the data to Excel to run formulas.
Note: Report variables are only available with Report Designer.
Create a report variable for a standard or custom report
- Click Reading in the upper-right corner of the open report to switch the report display to Design mode.
- Click the Add a new variable button () in the Objects tab of the Main side panel. The Create Variable dialog opens.
- In the Create Variable dialog:
- Enter a name for the variable.
- (Optional) Click the Show/Hide description panel button () to open the Description text field and enter a description for the variable.
- Select the type of variable you're creating from the Qualification drop-down list.
- Dimension (default)
- Measure
- Detail - If selected, click the Display list of dimensions button (), select an associated dimension from the Objects and Variables dialog, and click OK.
- Enter the formula for the variable in the Formula pane by double-clicking objects in the following panes.
Note: When available, single-click an object, function, or operator value to view its definition beneath the Formula pane.
- Objects
- Functions
- Operators - You can choose from the list of available values to insert values for a particular report object into the variable formula. After you have added a report object from the Objects pane:
- Click the Show operators list button ().
- Double-click an operator in the Operators pane to add it to the formula.
- Click the Validate formula button () to validate your formula.
- If your formula fails validation, you will receive a warning message about your error(s).
- Click OK to close the warning message dialog.
- Edit your existing formula or click the Cancel formula button () to start over.
- If your formula fails validation, you will receive a warning message about your error(s).
- Click OK to save your variable.
Delete a report variable
You can delete variables from standard or custom reports.
- Click Reading in the upper-right corner of the open report to switch the report display to Design mode.
- Click Dimensions in the Document dictionary pane of the Main side panel to collapse the accordion.
- Select the variable you want to delete from the Variables accordion.
- Click the More options button () and select Delete from the pop-up menu. The Warning dialog opens.
- Click OK in the Warning dialog. The variable is automatically deleted.
Edit a report variable
You can edit variables from standard or custom reports.
- Click Reading in the upper-right corner of the open report to switch the report display to Design mode.
- Click Dimensions in the Document dictionary pane of the Main side panel to collapse the accordion.
- Select the variable you want to edit from the Variables accordion.
- Click the More options button () and select Edit from the pop-up menu.
- Edit the variable as desired.
- Click OK to save your changes.