After you define retrieval arguments, you must reference the arguments in the Where view or Having view in the Select painter.
To reference an argument means to refer to the argument in an expression so that InfoMaker can use it as a placeholder until you provide the actual value. For example, if a report is retrieving all rows from the Department table where the DeptID matches a value provided, the WHERE clause looks something like this:
WHERE DeptID = :Entered_id
where Entered_id was defined previously as a retrieval argument in the Specify Retrieval Arguments dialog box.
How retrieval arguments are referenced In SQL statements, variables (called host variables) are always prefaced with a colon to distinguish them from column names.
A retrieval argument is a variable. To reference the retrieval argument Entered_id in a SQL statement, enter:
:Entered_id
To reference an array, use the IN operator and reference the retrieval argument in the WHERE or HAVING clause.
For the case of the array defined as deptarray, the expression in the Where view will look like the following expression. You can paste the :deptarray argument using the pop-up menus in the value area of the Where view:
When you preview the report, you are prompted to supply the department values. InfoMaker retrieves rows that match one of the set of values that you supply. For example, if you supply the department IDs 100, 200, and 500 as shown, your report displays information about these departments: