REPORTER 22.1

Creating and Editing Variables

Creating and editing variables

Variables can be viewed, edited, and created by using the Edit... option in the Variables menu. Selecting this option will bring up the Variables window.

Some of the variable such as CURRENT_PAGE and REPORTER_HOME are predefined variables that are predefined by REPORTER . and these cannot be edited or deleted, other user defined variables can be edited or deleted as you chose.


You can create a new variable by selecting New . Then in the New variable box at the bottom of the window enter the necessary details into the text boxes.

  • Name - enter the variable name you want to use to refer to this variable. Variable names should only use letter (A-Z) or numbers (0-9) and underscores. REPORTER will automatically convert the name into uppercase and replace any spaces with underscores when the new variable is created.
  • Description - enter the description for the variable. This is only for reference and is not actually used by REPORTER . However, it is strongly recommended that you give meaningful descriptions for variables.
  • Value - enter the value for the variable. This can be any text string or number you want.
  • Type - the variable type allows you to give an indication what the variable will be used for. The following types are predefined in REPORTER .
    • Directory
    • Expression
    • File(absolute)
    • File(basename)
    • File(extension)
    • File(tail)
    • General
    • Number
    • String
  • Additionally you can give your own variable types if it helps you to manage variables. The Directory and File types also allow you to choose a directory/file interactively using the Browse... button. The different File types allow you to extract certain parts of the filename from the file you choose. For example selecting a file '/data/demo/test.key' by using Browse... would result in the following:

    Variable type Part of file that is extracted
    File(absolute) /data/demo/test.key
    File(basename) test
    File(extension) key
    File(tail) test.key
  • Temporary - tick the box if the variable should be temporary or not. This makes no difference to how the variable is used in REPORTER , however for convenience temporary variables can be removed from the template at any point by using the Delete temporary variables option in the Variables menu.
  • Format - the format settings allow you to specify how the variable value is displayed within the REPORTER presentation view. Available options are:
    • Floating point number - displays a number variable as a floating point number. The number of decimal places can be specified using the precision setting.
    • Scientific number - displays a number variable as a scientific number. The number of decimal places can be specified using the precision setting.
    • General number - this uses the shorter of the floating point or scientific methods above..
    • Integer - displays a number variable as an integer.
    • Uppercase - displays a string type variable in uppercase.
    • Lowercase - displays a string type variable in lowercase.

    The setting used here is applied to everywhere the variable is displayed in the report, unless a local format setting is used. The format setting does not change the underlying value of the variable.

You then click on the OK button to store this new variable. The Cancel button will just exit you from this window.

The only variables which can be edited are the user defined ones you create yourself. To edit a variable select the Variable option in the File menu to bring up the Variables window. You can edit the description or value of a variable by clicking on the relevant description or value in the variable list and pressing Edit . You cannot edit the variable name. If you want to rename the variable you will have to delete the existing variable and re-create it using the new name.

For more information on doing simple maths with variables (by using the expression type) see Variable expressions.