14.33. Reports.General

This tab is in the Reports tab. The Reports.General tab allows you to generate a number of different reports. Depending on which report format has been selected, you can choose a set of values to select the data on which to report.

14.33.1. Format Choices

On the left side of the Reports tab are a set of choice that affect the format of the report.

  • The Report Format choice allows you to select the type of report you want. When you select a Report Format, a brief description of that format appears below the choices in the right half of the Reports tab.

  • The Annotation choice allows you to specify a PRELIMINARY or REVISED annotation to be used as a watermark in the background of the report.

  • The StyleSheet choice allows you to specify a style sheet for use by the report. Not all reports take full advantage of this feature. You can select from the available built-in styles, or you can create your own. This is discussed in more detail below.

  • The Paging choice allows you to specify whether or not to generate page breaks at selected points in the report. In Single, Double or Paged mode, page breaks are inserted after one, two, or as many pieces as fit on a page; in Packed mode, no page breaks are inserted.

  • The Order By choice allows you to specify the order in which data is printed in the report. The available values change based on the selected Report Format, and may be blank if there are no sorting options for that format.

  • The Generate button generates the report. The output is placed into the Report tab in the bottom half of the screen, from which it can be saved or printed using commands in the Report menu.

14.33.2. Selection Choices

On the right side of the Reports tab are a set of choices for different types of data. When you select a Report Format, some of these choices are available and some are not. By default, unavailable selection fields are removed from the form. If you want to see all of the fields, including those that are currently unavailable, set the "Show Disabled Selection Fields" toggle. Fields which are not editable are not used in the selected report.

You can enter values in the editable fields to select the set of records on which to report. Each field you specify further restricts the selected records on which to report. For example, if you specify both an Event Number and a Race Date, then only Races which are for the selected Event Numbers AND which are on the selected Race Date are used.

14.33.3. Report Styles

The general report mechanism in JRaceman is built on top of HTML, and takes advantage of HTML's CSS (Cascaded Style Sheet) ability. For the reports in the Reports.General tab and in the Reports task of the ByEvents tab you can select the style sheet to use. Alternatively, you can provide your own custom style sheet.

The standard styles available are:

  • Classic - This is the style used in all versions of JRaceman through 0.9.3, and is equivalent to no CSS styling. All style properties are set to their default HTML values.

  • Zebra - This style uses alternating white and light gray backgrounds for each row of the report, and reduces the report spacing to pack more data onto each page of output. Using this format allows up to 50% more data to be printed onto each page of paper. If you save the report to an external file and use Firefox (or possibly another standard web browser) to view and then print the file (with print-background-colors enabled), it will squeeze a few percent more per page.

You can define custom styles by adding the appropriate data to the ContextOptions table. You can do this manually using the Database/ContextOptions tab, or you can create a JRaceman text file and import it using the "Import JRaceman Data File" item in the Database menu.

For an example of loading a custom style from a file, see the file data/sample-custom-style.txt, which defines two sample custom styles:

  • custom1 - a custom style that uses an external style sheet located in /tmp/custom.css.

  • custom2 - a custom style that uses an internal style, which gets included into the header of the report when it is generated.

You can either load this file then edit the data using the Database/ContextOption tab, or you can copy the file to your own location, edit the file, and then load the edited file.

To create a custom style by hand, you need to create a Context Option called Report.Style.YourCustomName.css, where YourCustomName is replaced by whatever name you want to appear in the Style choice list. The name must not include any spaces or puctuation characters, except that it may include period, dash, and underscore. The value for that Context Option should be a valid piece of HTML, which will be inserted into the report header. That HTML snippet should be either a "<style>" element for an internal style, or a "<link>" element for an external style. Your custom style names will appear in the Style choice list after all of the standard choices.

When you add or change custom style names, the Style choice list in the Reports.General tab will automatically update to reflect that change the next time the tab is selected. If you are viewing that tab when you import a file that makes changes to the custom style names, you must select another tab and reselect your tab in order to make the Style choice list update to reflect your changes.

When creating a custom style sheet, you can create styles for the following class names used in the reports:

  • bottom - The part of the header or footer that follows the jracemanDateLine. This area contains three subareas with class names left, center, and right.

  • center - The center element within a top or bottom element.

  • footer - The footer area of the report, after the main table. This area contains subareas with the same three class names as the header class: top, jracemanDateLine, and bottom.

  • header - The header area of the report, before the main table. This area contains subareas with the same three class names as the footer class: top, jracemanDateLine, and bottom.

  • jracemanAnnotatedDateLine - The line containing the date the report was printed (actually generated) and the jraceman.org notice when it includes an annotation.

  • jracemanDateLine - The line containing the date the report was printed (actually generated) and the jraceman.org notice.

  • jracemanFooter - A line containing JRaceman info.

  • left - The leftmost element within a top or bottom element.

  • main - The main data table or area.

  • preFooter - An area in a few reports that comes after the main area and before the footer area.

  • preHeader - An area in a few reports that comes before the header area.

  • right - The rightmost element within a top or bottom element.

  • rowFinishAttachment - A row in the Race Finish report that includes a place to attach a results printout.

  • rowFinishAttachmentSpace - A row in the Race Finish report that provides a spacer above a rowFinishAttachment row.

  • rowHeader - A header row in the main table.

  • rowParity0, rowParity1 - these two classes are used on alternating rows of the table. They can be used to implement alternating background colors as us used in the Zebra style sheet.

  • rowProgressionInfo - a row under the main table in a few reports that includes the progression info for the Race.

  • rowSep - A row in one of the Race reports, such as Race Lanes, that separates the rows containing the entrant data.

  • rowSepUnderHeader - The separator row that appears just under the table header in some reports.

  • rowTotal - A total row, typically the last row of the main table.

  • titleArea - The area containing the title information. This preceeds the main area but follows the header.

  • top - The part of the header or footer that preceeds the jracemanDateLine. This area contains three subareas with class names left, center, and right.