| Using Console / Running Reports | |
... WHERE contact = '$CONTACT_MATCH'; # $CONTACT_MATCH is the custom variable. ...Once you declare the variable within the SQL script text, you can view and edit the variable on the Edit Advanced Report Template page.
| Variable Type | Description |
|---|---|
| string | The value of this variable must be a string. |
| integer | The value of this variable must be an integer. |
| date | The value of this variable must be a valid date. Click the calendar icon to select a valid date. |
| ip | The value of this variable must be a valid IP Address. |
...
WHERE
...
AND (
t.status = '$FOO'
OR '$FOO' = ''
)
...
Failure
to include OR '$FOO' = '' results in an empty report
because the data is filtered by t.status = '', which is
always false.