Report variables
Learn how to use report variables and objects to create reusable, predefined formulas in Report Designer.
Overview
You can create a report variable when modifying a standard report or when creating a new custom report. 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
- From the open report, click Design to display the report in Design mode.
- From the Side Panel, click Available Objects ().
- Right-click the Variables folder and select New.
Or
Navigate to Data Access > Data Objects > New Variable in the Design Toolbox. - In the Create Variable dialog:
- Enter a name for the variable.
- (Optional) Enter a description for the variable.
- Select the qualification for the variable.
- Dimension (default)
- Measure
- Detail
Note: If selecting a Detail, select the Associated dimension by clicking the button.
- Enter the formula for the variable in the Formula box by double-clicking objects in the following lists:
Note: A definition for the selected object, function, or operator appears in the Definition panel when available.- Available Objects
If you are inserting values for a particular object into the variable formula, you can choose the values from the list of values:- Select an object from the Available Objects list.
- Double-click Values... from the Available Operators list.
- Select the value(s) to add to the formula and click OK.
- Available Functions - Click More on this function to view a description of the function in a new browser tab.
- Available Operators
- Available Objects
- Click the Validate formula () button to validate your formula.
- If your formula passes validation, you will receive the following confirmation message: The formula is defined correctly. Click OK to close the confirmation message dialog.
- If your formula fails validation, you will receive a warning message specific to your error(s). Click OK to close the warning message dialog.
- Edit the existing formula
Or
Click the Cancel formula () button to start over.
- Edit the existing formula
- Click OK to save your variable.
Delete a report variable
You can delete variables from standard or custom reports.
- Standard report: From the open report, click Design to display the report in Design mode and then click Available Objects () in the Side Panel.
Custom report: From the Side Panel, click Available Objects (). - Right-click the variable you want to delete and select Delete.
- In the Remove Variable dialog, click Yes to permanently delete the variable.
Edit a report variable
You can edit variables from standard or custom reports.
Edit variable properties
- Standard report: From the open report, click Design to display the report in Design mode and then click Available Objects () in the Side Panel.
Custom report: From the Side Panel, click Available Objects (). - Under the Variables folder, right-click the variable you want to edit and select Edit Properties....
- In the Edit Properties dialog, you can:
- Edit the variable name in the New value field.
- Edit or add a description for the variable.
- Click OK to save your edits.
Edit a variable
- Standard report: From the open report, click Design to display the report in Design mode and then click Available Objects () in the Side Panel.
Custom report: From the Side Panel, click Available Objects (). - Under the Variables folder, right-click the variable you want to edit and select Edit.
- In the Edit Variable dialog, edit the variable fields as needed.
- Click OK to save your edits.