The Report Design window is the main window used to edit, save, and run a report. To the left are section labels, to the right are the sections containing report fields. The labels, sections, and fields all have popup menus that appear when you right-click them.
Drag the bars to re-size report sections.
To select a field, single-click it. To select more than one field, hold down the shift key while selecting the fields. Not yet implemented: You may also select fields by clicking and dragging a selection box with the mouse.
Click and drag a field to move it. Drag the edges to re-size it. Moving and dragging operate on the current selection. If multiple fields are selected they will all be moved or re-sized.
Field commands (format, re-size) operate on the set of currently selected fields.
To insert a new section, right-click on a section label or section and select ``Insert Section''.
Fields have popup menus. Sections have popup menus. The section labels on the left side have popup menus.
For more information about the Field Picker window, see Section 9.3, The Field Picker Window.
To reorder groups or change a groups sort order, select Group By... from the Report menu.
When you select one of the field types from the Insert menu on the design window, this window opens. It contains a tree list containing all database field types except text labels. Click and drag a field to add it to the report.
The first item in the window is ``Database Fields'' and the last item is ``All Database Fields''. In a newly created report, the first ``Database Fields'' item will be empty, because it displays database columns that are already in the report.
Drag database column, formula, parameter, or special field from the Field Picker window into the report. As an added bonus, when you drag a database column into a ``Detail'' section, the name of the column will automagically appear in the ``Page Header'' section.
This window also lets you create and edit formulas and parameters.
Open by selecting Subtotals... from a numeric field's popup menu.
This dialog will open. It contains check boxes for each group in the report, along with a ``Grand Total'' check box. Select groups and ``Grand Total'' to make (sub)totals appear.
The Grand Total will be created in the Report Footer section of the report.
The Format Dialog has two tabs labeled ``Format'' and ``Border''. The contents of the ``Format'' tab edit the look of a field (its size, font, alignment, etc.) The contents of the ``Border'' tab edit the borders that surround a field. These borders are not yet displayed by the GUI, though they are output by layout engines such as the LaTeX engine that understand them.
The ``Format'' tab lets you edit a fields text size, text attributes such as bold, italic, underline, and wrap, text alignment, and the printing format of numbers and dates.
The ``Format'' string needs a bit of explaining. It is used by a Java formatting object that is appropriate for the type of field. For numeric fields, this string is used as input to a DecimalFormat object. For date fields, it is used as input to a SimpleDateFormat object.
For numeric fields, you create a ``picture'' of how you want the number to appear. Use either `#' or `0' characters to represent numbers; `#' will print blanks if no digit is needed, `0' will print a zero. Add commas or decimal points where appropriate. The number of `#' characters you use is not important. To print negative numbers by using a leading minus sign (or whatever is appropriate for your locale), you need do nothing. To print negative numbers by using parenthesis, you need to add the string ``;(#)'' to the end of your format string.
For a complete and detailed discussion of the numeric format strings, see the java.text.DecimalFormat documentation.
Here are a few example numeric format strings, using the separator characters used in the USA. We will apply each to the number 1,234.0078.
For date fields, you create a format string that is understandable by the SimpleDateFormat class. Briefly, use `y' for year, `M' for month, `d' for day, `E' for day of the week, and `h', `m', and `s' for hours, minutes, and seconds. Use 'yyyy' for four-character years and 'yy' for two-character years. For a complete and detailed discussion of the date format strings, see the java.text.DecimalFormat documentation.
Here are a few example date format strings, using the date/time August 27, 2002, 12:36 pm.
The ``Border'' tab lets you edit the border surrounding a field. You can specify top, bottom, left, and right borders. Each is defined by a count (zero, one, two, or three lines), a style (line, dashed, or dotted), and a thickness in points. Remember: not all layout engines support borders. Only the line style works.
This dialog lets you edit the information needed to connect to the database: the driver class name, connection info string, database name, user name, and password. For information about each field in this dialog, see Section 5.1, Connecting to the Database.
Use this dialog to create or edit links (joins) between tables. The top of the window displays a list of joins or links between table columns.
New reports start with no joins between any columns. When you first open this dialog, the area above the ``Add'' and ``Delete Selected'' buttons will be empty.
To add a new link, click the ``Add'' button. To delete links, select them with the check boxes on the left side of the window and then click ``Delete Selected''.
Each row above the ``Add'' and ``Delete Selected'' buttons represents one link between two database fields. To the left and right are combo boxes (drop down menus) that let you select database fields. In the middle is a combo box that defines the relationship between the two fields (for example, ``equals'' or ``greater than'').
To further limit the records retrieved by a report, enter a SQL where clause by using the ``Select Records'' dialog (see Section 9.4.8, The ``Select Records'' Dialog).
To be written.
The main text pane in this window lets you edit the text of a formula. You can drag database fields, formulas, parameters (not yet implemented), and special fields into this window.
To open a formula editor, double-click on a formula field in the report. Within the Field Picker window, select a formula then select Edit Formula... from the Field menu.
For a description of the simple formula language, see Section 6.3.1, The RPN Mini-Language.
The main text pane in this window lets you edit the text of a SQL where clause. You can drag database fields, formulas, parameters, and special fields into this window.
When you run a report by selecting Run Report... from the Report menu, a report view window opens and displays the report output.
From this window you may print the report or save it to disk using one of the other layout engines.
See Section 8, Running a Report for more information on the Report View window.