Use a variable

To create a variable:

  1. Make sure that variables are activated in your report template (see Activate the use of variables).

  2. Add two text fields or a data fields to the template.

  3. Select the two fields and click to create a composite group.

  4. Repeat the composite group on Sample_Name.

  5. Enter a customized expression as a value for one of the fields, for example a correction factor for the sample amount: =Sample_Amount * 99

  6. Click Save Expression Result As...

  7. The Save Expression Result As dialog opens.

  8. Make sure that the Variable option is selected, and enter a Calculation Variable Name, for example VarAmountCorrected.

    No special characters are allowed in the variable name.

  9. Save your settings.

To use the variable in subsequent report items:

  1. Resize the composite group to provide space for new report items.

  2. Add a table with compound information to the composite group, for example the Compound Results table.

  3. Add a new column to the table. Enter a customized expression as a value for the new column, for example the compound amount multiplied by the corrected sample amount: =Compound_Amount * VarAmountCorrected