The <Condition> tag provides a number of
different ways of obtaining run time parameters from the user.
The <Condition tag must be within a <where> tag. The basic
format for the tag is as follows, but this varies according to
the 'type'.
<Condition field="Surname" operator="equal" type="Text"
name="Surname"
/>
The attributes available within the
<Condition> tag are :-
name - The name of
the parameter (as displayed to the user when the report is
run).
field. - The table
name and the field name. The table name is only required if necessary to avoid
ambiguity. Special consideration apply to the field when the type is "VagueDate"
or "SpatialRef". See details for each Type.
operator
- "equal”, “not equal”, “like”, “less than”, “greater than”, “less
than equal” or “greater than equal” are supported, but not for all
Types.
type
- the type for the parameter. These control the way in which the
user is prompted for the parameter. Links are provided for
detailed information on the use of each type.
- Text -
the user will be prompted to enter either text (applies to text and memo
fields)
- Number - the user will be prompted to enter a number (applies to
integer fields).
- Date - the user will be required
to enter a date (dd/mm/yyyy). (applies to DateTime fields.
- VagueDate
- User enters a Recorder 'Vague Date'
- TrueFalse - User has tick box to choose true or
false
- CSVFile - Uses data in a CSV file (this is not working, but CSV files
can be used as temporary tables (see Using External
Files) )
- Location, Name, Individual,
Organisation, Taxon- User enters name or
chooses from the appropriate list.
- BoundingBox - user enter
co-ordinates for bounding box
- GridSquareRange - user enters the start and end of a
grid square range
- SpatialRef - users enters spatial reference
- .LocationsinPolygon -
users selects a polygon from list or from map
window.
- SamplesinPolygon
- users selects a polygon from list or
from map window..
OptionSet
- Gives the user a choice from a list of
possibilities.
Special Attributes - These attributes are used for special
purposes and can be used with several types.
CurrentUserId - This does not show as a
parameter, but returns the Name_Key of the person running the
report
entrycount - Optional. Defaults to 1 meaning that only a single
instance of the parameter entry control is available. If greater than 1 then the
control is repeated that number of times. If -1 then the user controls the
number of entries made. If the value is not 1 then the only valid operator
is 'equal'. Further information is
available with the information on each type
attribute
userucksack - allows entries
in Rucksack to be
used.
selectoneofgroup - groups
together condition so that only one can be
selected.
datatype - used with CSV
files. Determines what data type the parameter
has.
SubstitituteFor - Allows a
piece of text to be substituted in the
SQL.