Table Wizard |
|
To insert tables into the report use the table wizard. The table wizard helps you to select and organise fields which are part of a collection or class and offers you filtering-, grouping- and sorting-options.
To pop up the table wizard
| Click the new table icon in the tool-bar. |
The table wizard window also pops up automatically when you drop a collection from the fields list onto the page.

A collection in the field list is indicated by the collection icon:
The type in
angle brackets indicates the element type.
The table wizard enables you to
ReportWeaver offers you a list of collections with elements in it
Table Wizard with open "Data" page
| Click one of the collections to select it. | |
| Click the Next- button to pop up the Select-Fields page. | |
| Click the Cancel button to cancel the operation. |
Table Wizard with open "Select fields-Window"
| > | Click the > to add the selected fields to your table. |
| < | Click the < to remove the selected fields from your table. |
| Click the up button to move a selected field up in the list. (this will move the column of the field to the left in the resulting table). | |
| Click the downbutton to move a selected field down in the list. (this will move the column of the field to the right in the resulting table). | |
| formula.. | Click to open the oql formula dialog. There you can add a computed field. (E.g. the difference of two fields) |
| type | Sometimes the element type of the collection is not precisely specified. I.e it is only a base class like Object/void. The type button will examine the collection and propose the actual type. |
| Click the Back button to choose another collection. | |
| Click the Next button to pop up the grouping page. | |
| Click the Finish to add the table to the page template withou further refinements. | |
| Click the Cancel button to cancel the operation. |
Table Wizard with open Grouping page
| > | Click the >button to turn on grouping by the selected field. |
| < | Click the <button to turn off grouping by the selected field. |
| Up | Click the upbutton to change the order of grouping. Higher fields will be grouped first. |
| Down | Click the downbutton to change the order of grouping. |
| Ascending | Show the groups in ascending order. (Deleselect to sort descending) |
| Case | Select to use the case when sorting. (Deselecting case for a number causes sorting to ignore the sign of the number) |
Note:Fields that have been selected for grouping are removed from the list of available fields because each field can only be used once for sorting or grouping.
Note:You can group by more than one field. E.g. You can first group by year, then by moth and finally by day.
Table Wizard with open sorting page
| > | Click the >button to turn on sorting by the selected field. |
| < | Click the <button to turn off sorting by the selected field. |
| Up | Click the upbutton to change the order of sorting. Higher fields will be used first for sorting. |
| Down | Click the downbutton to change the order of sorting. |
| Ascending | Show the objects in ascending order. (Deleselect to sort descending) |
| Case | Select to use the case when sorting. (Deselecting case for a number causes sorting to ignore the sign of the number) |
Note:Fields that have been selected for sorting are removed from the list of available fields because each field can only be used once for sorting or grouping.
Table Wizard with open totals page
Each field can be totalled with several different functions. And for each function four different totals can be computed:
Note: In the properties of the table you can select whether running or page totals appear on the last page or not.
Note: The default total is to calculate the grand total with absolute numbers.
Filtering means the selection of objects (rows) from the collection.
ReportWeaver uses OQL query expressions to filter the table. OQL is a superset
of SQL (and of EJB-QL) for objects.
Please
Please
Table Wizard with filter page

| Type the |
|
| Press Check to compile your OQL expression and to check it for
errors. If there are new variables in the query, then the
|
Hint: Use the $ notation (e.g. $variable)
to parameterize your query. (E.g. getPerson.getName=$name)
Editing query variables.
An interactive filter asks the user which elements from a collection shall appear in the table. To configure an interactive filter, you must specify which field shall appear in the pick-list. You must also specify the prompt string, that indicates what is beeing selected.
Layout page

After you have finished the table wizard, the table will appear in your page template as shown below.

Note: Once the table is generated, you can only edit it through drag and drop and through the functions in the table menu. Here you can do the same things like in the table wizard except changing the grouping structure. Because this completely changes the table, you need to delete the table and create it anew.
For more details see
table