Report parameters provided either internally or interactively can be used for customized calculations. The way report parameters are referenced in expressions depends on the parameter type (single-value or multi-value).
Syntax: =<ParameterName>
Example:
Your report contains a table with peak results. You want to offer the possibility to multiply the results by a correction factor.
In the Report Parameters dialog, create a single report parameter named CorrectionFactor with the data type Integer and the default value 1.
In the table, enter the following expression in the Value field for the column:
=Compound_Amount * CorrectionFactor
This syntax is valid as long as the Multi-Value check box is cleared. Even if you enter several values under Available Values, the user can only select one of these values, and the expression is unambiguous.
If you have selected the Multi-Value check box, all selected values will be stored in a collection. Therefore, you must add an index to the parameter name to refer to a specific value.
Syntax: =<ParameterName>(<index>)
Example:
For a multi-value report parameter named MyPara, use the following:
=MyPara(0) to refer to the first selected value
=MyPara(1) to refer to the second selected value
... etc.