The Criteria Menu is where you set up the criteria that a user may
choose for a report. For example, in a stock control database you may have
a report that shows items that are currently in stock. For such a report,
you may wish to be able to run the report for specified suppliers and/or
specified products and/or specified product types and/or products that
came into stock between a particular date range. These selections can only
be made on the report by setting each one as a criteria item within this
section.
Each criteria item can operate in Expanded or Normal mode. When the
report criteria screen is first displayed each criteria item is presented
with a name and an input area that shows the users current selection. Each
item here is in Normal mode and each one may be presented as an input
field, a set of check boxes or with no ability for the user to enter
criteria here. If an item is configured to expand then the Expand button
(>>) appears alongside the criteria item. Pressing this provides
entry of selection criteria for that item in the Expand pane on the right
hand side. Where criteria items can be selected from a multi-selection
list generated from database tables it is sensible to have this list
presented in expand mode. In normal mode you may just summarise the user's
selection or allow entry in a text box or use check boxes, list boxes and
radio buttons where the selection list is small.
The Criteria Menu is where you set up the criteria that a user may
choose for a report. For example, in a stock control database you may have
a report that shows items that are currently in stock. For such a report,
you may wish to be able to run the report for specified suppliers and/or
specified products and/or specified product types and/or products that
came into stock between a particular date range. These selections can only
be made on the report by setting each one as a criteria item within this
section.
There are 7 ways a criteria item may be presented during criteria
entry. A criteria item may also be presented differently when in Expand
mode (the mode you enter when you press the Expand (>>) button for
an item). These different display methods are :-
Lookup criteria Items can be linked together so that the list of
values that the user selects from relates to another criteria selection. For
example, if a set values for a country criteria item is selected, then a link
can be set up that ensures when selecting from
a city criteria, then only those cities belonging to the selected
countries will be presented.
This is performed by embedding an extra where clause that pulls in
the relevant users choices from another criteria into the lookup SQL. This
is done in the same way as bringing criteria into the main report query.
See Linking in Criteria Values for more details.
Selecting the Criteria tab presents you with the existing criteria
items, if any, and allows addition of more.
To edit or view the attributes of an existing criteria item, click
on the relevant criteria item button and then the Details sub tab menu that
appears.
The Criteria Item Details Pane
This is where you set up the basic attributes of a criteria item
that identify the type of item and how the item is presented and selected
from. Also how the criteria is incorporated into the main query and any
links to that criteria. Default values for the criteria can also be set
here.
Name
The name of the criteria item. This is name used to reference this
item when linking to it or incorporating it within the main report
query. This is not the same as the criteria title.
Title
This is the label displayed alongside the criteria item during
report criteria entry.
Main Query Column
This is an easy way of linking the criteria selection to the main
report query without having to specify the link in the main report query
SQL using the "[]" notation. By filling in this value, when the report
runs, the main SQL will be modified to link in this criteria item by
adding a line to the where clause something like "AND table.column IN
({criteriavalues})" where table.column is the value entered in this
field and {criteriavalues} are the users selected values that relate to
the Return Column described below.
If this value is not filled in then the main query must be
modified to reference the criteria item using "[]" notation.
Criteria Type
Indicates the behaviour of the criteria item. The criteria types
of Text Field, Database Lookup, Date, Date Range and Custom List are described
above.
Criteria Display
Indicates how the criteria item is presented to the user in Normal
mode when selecting criteria on the left hand side of the report
criteria entry screen. This values identifies whether the criteria
should be selected via list box, check box etc. The valid values of
No Entry,Text Field,Drop Down List,Multiple Selection Listbox,Checkbox,Radio Button and Date Fields are
described above.
Expand Display
Indicates how the criteria item is presented to the user in Expand
mode when selecting criteria on the right hand side of the report
criteria entry screen. This values identifies whether the criteria
should be selected via list box, check box etc. The valid values of
No Entry,Text Field,Drop Down List,Multiple Selection Listbox,Checkbox,Radio Button and Date Fields are
described above.
Return Column
Relates to Database Lookup criteria types only and is only available once a
criteria SQL query has been made in the SQL sub tab. It is the name of
the column from the criteria SQL whose values are used by the main report
query in order to generate report output that matches the user's
selection for this criteria.
For example, in the case of a country criteria that selects both country_code and country_name from the country table, you probably
want to use the country_code values to
link in with main report query (and use country_name as the column which the user selects
from). In this case the country_code
column should be selected here.
See the start of this page for details of how criteria works within Reportico.
Display Column
Relates to Database Lookup criteria types only and is only available once a
criteria SQL query has been made in the SQL sub tab. It is the name of a
column from either the criteria SQL or created as an assignment column
whose values are used to populate selection list boxes, check boxes,
radio buttons that the user may select from.
Overview Column
Relates to Database Lookup criteria types only and is only available once a
criteria SQL query has been made in the SQL sub tab. It is the name of a
column from either the criteria SQL or created as an assignment column
whose values are used to summarise the user's selection in Normal
mode.
For example, in the case of a country criteria that selects both country_code and country_name from the country table, you may wish
the full country name to be selected from in Expand mode, but country
codes to be displayed or entered in the summary box in Normal mode. If
this is the case then, country_code
should be chosen.
Match Column
Relates to Database Lookup criteria types only and is only available once a
criteria SQL query has been made in the SQL sub tab. It is the name of a
column from either the criteria SQL or created as an assignment column
whose values are compared with the user's search string in expand
mode when the Search option is used.
Defaults
Provides default selection values for this criteria item that are
already selected when the report criteria screen first displays. These
must be values that relate to the Return Column described above.
For Text Field,Database Lookup and Custom List types then this can be populated
with comma separated values.
For Date types a single date value can be entered or more useful
codes as follows:-
TODAY - defaults to today's date
YESTERDAY - defaults to yesterday's date
TOMORROW - defaults to tomorrow's date
FIRSTOFMONTH - defaults to the date of the first day of this
month
LASTOFMONTH - defaults to the date of the last day of this
month
FIRSTOFLASTMONTH - defaults to the date of the first day of
last month
LASTOFLASTMONTH - defaults to the date of the last day of last
month
FIRSTOFYEAR - defaults to the date of the first day of this
year
LASTOFYEAR - defaults to the date of the last day of this
year
FIRSTOFLASTYEAR - defaults to the date of the first day of
last year
LASTOFLASTYEAR - defaults to the date of the last day of last
year
STARTOFWEEK - defaults to the first day of this week
ENDOFWEEK - defaults to the end day of this week
STARTOFLASTWEEK - defaults to the first day of last week
ENDOFLASTWEEK - defaults to the end day of last week
For Date Range types, the lower and upper range values can be
specified with a separating hyphen ("-"). So to default a Date Range
criteria item to last month, you should enter FIRSTOFLASTMONTH-LASTOFLASTMONTH.
List Values
For Custom List criteria items only. Provides the values that the user
can select from and the values that will be used in the report query
when generating the report data to match the query. The values should be
entered as comma delimited values each consisting of a query value and a
display value separated by commas.
So for example, if you entered a value of
Gold=G,Yellow=Y,Blue=B,Lime Green=L,Red=R then user will be able to
select from a list comprising "Gold", "Yellow", "Blue", "Lime Green" and
"Red" but it is the keys of G,Y,B,L and R that are used in the main
query.
If you wanted to default this criteria item to Gold and Blue, you would enter G,B against the Defaults parameter.