Adding Special Characters for Filtering Reports
If you feel that your report will require the use of a filter, then return to the Free Type Query Editor and add a special character into the query where the filter (WHERE statement) should be placed.
In this example, the Employees table in the sample database is used. A filter will be applied to the salary in the report, therefore the WHERE clause needs to be added to the end of the query. Position the cursor on the first blank line at the end of the query, and click the Insert Special icon
. This brings up the “Insert Special Sequence” dialog box shown below.
Select “New Filter”, then click the OK button.
The string --$newfilter is inserted at the end of the query. This string serves as a placeholder such that when the Filter tab is selected when creating the report, the WHERE clause that the filter creates will replace the -$newfilter string. Note the location of the special character string in the figure below. This special character must be placed at the appropriate location within the query since it will be replaced by the WHERE statement created by the report.
If your Free Type query already has a WHERE statement, (and you are adding a second filter through the report design), then select “Add Filter” instead of “New Filter". This will prevent Argos from replacing the existing WHERE statement and will add the second WHERE statement.
You can now use the Filter tab when designing your report.