Interactive Data Selection
There are four ways to query the user to select data interacively.
- Simple Variables: These are values that the user types in or selects which
are independent of the database contents. E.g. A date or a number. Simple
variables are defined with the Query-Variable-Manager that can be accessed from
the Tools/QueryVariables menu.
- Variables where the selectable values come from the database, but are
independent from the report where they are used. (root variables)These
variables are serched relative to a database root. Database variables are
defined with the Query-Variable-Manager that can be accessed from the
Tools/QueryVariables menu. The results of this selection can be used in an OQL
expression. (as the right argument to the in operator. For an example
please see below.
- Interactively filtered tables. These are defined using the table wizard.
Please note, that only the top level of a set of nested tables can be filtered
interactively.
- Interactively filtered collections defined in views. You can also add an
interactive selection in the view editor, which is called an interview. In the
view you can also specify, that the interactive selection return only one
element. This allows it to be treated as a singleton, which gives it more
options for layout. Here too only the outermost collection of a set of nested
collections can be filtered interactively.
An exception is the combination
of singleton picks (interviews that return a single object). These can be
nested to any depth and can be followed by an interview.
Combining several query parameters.
You can have any number of variables and any number of independent filtered
collections associated with a report. They will be combined into one query
dialog. The menu: Edit/Interview Sequence allows you to set the
ordering of the interview steps.
Note: The order of the steps is not
completely free. One step may be using the results of a previous step. In this
case ReportWeaver assures the proper sequence. (I.e you cannot reorder the
steps, so that they become illegal.)
Plese see the chapters below for details.
OQL reference
Defining Variables
How the user is queried interactively
Defining interactive filters in views.
Using Root Variables
Root variables are so called, because they are defined relative to a
database entry point (root) which may be independent from the root that is used
in the report template.
Example: Assume there is a collection of orders and a collection of
customers. If you want to show all orders for a group of customers and you want
to allow the user to select the customers interactively, then you would create
a root variable, for the customer root. The settings are shown as below.
- The customers are selected as data entry point.
- The elements collection is selected since it contains the actual customers.
- The name field of the customer will be displayed in the selection list.
- An additional optional OQL Filter can be set.
- The initial selection will be empty.
- A list of Field Values (i.e a list of the selected names) shall be
returned.
The query is applied to a collection of orders. (which have a customer
field)
- The in operator checks if the name of the customer is in
the list of selected customers.
- The list is referenced using the $ notation.