Skip to main content
OCLC Support

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

Create Variable dialog - Image
Create Variable dialog

Create a report variable for a standard report

  1. From the open report, click Design to display the report in Design mode.
  2. From the Side Panel, click Available Objects (Available Objects button).
  3. Right-click the Variables folder and select New.
    Or
    Navigate to Data Access > Data Objects > New Variable in the Design Toolbox.
  4. In the Create Variable dialog:
    1. Enter a name for the variable.
    2. (Optional) Enter a description for the variable.
    3. Select the qualification for the variable.
      • Dimension (default)
      • Measure
      • Detail
         Note: If selecting a Detail, select the Associated dimension by clicking the Associated dimension button button.
    4. 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
      • Available Operators
  5. Click the Validate formula (Validate formula button) 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 (Cancel formula button) button to start over.
  6. Click OK to save your variable.

Create a report variable for a custom report

  1. From the Side Panel, click Available Objects (Available Objects button).
  2. Right-click the Variables folder and select New.
    Or
    Navigate to Data Access > Data Objects > New Variable in the Design Toolbox.
  3. In the Create Variable dialog:
    1. Enter a name for the variable.
    2. (Optional) Enter a description for the variable.
    3. Select the qualification for the variable.
      • Dimension (default)
      • Measure
      • Detail
         Note: If selecting a Detail, select the Associated dimension by clicking the Associated dimension button button.
    4. 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
      • Available Operators
  4. Click the Validate formula (Validate formula button) 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 (Cancel formula button) button to start over.
  5. Click OK to save your variable.

Delete a report variable

You can delete variables from standard or custom reports.

  1. Standard report: From the open report, click Design to display the report in Design mode and then click Available Objects (Available Objects button) in the Side Panel.
    Custom report: From the Side Panel, click Available Objects (Available Objects button).
  2. Right-click the variable you want to delete and select Delete.
  3. 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

  1. Standard report: From the open report, click Design to display the report in Design mode and then click Available Objects (Available Objects button) in the Side Panel.
    Custom report: From the Side Panel, click Available Objects (Available Objects button).
  2. Under the Variables folder, right-click the variable you want to edit and select Edit Properties....
  3. In the Edit Properties dialog, you can:
    • Edit the variable name in the New value field.
    • Edit or add a description for the variable.
  4. Click OK to save your edits.

Edit a variable

  1. Standard report: From the open report, click Design to display the report in Design mode and then click Available Objects (Available Objects button) in the Side Panel.
    Custom report: From the Side Panel, click Available Objects (Available Objects button).
  2. Under the Variables folder, right-click the variable you want to edit and select Edit.
  3. In the Edit Variable dialog, edit the variable fields as needed.
  4. Click OK to save your edits.

 

  • Was this article helpful?