Report4j

Home Features Screenshots Documentation Download Support

User Guide

Contents

  1. Installation
  2. Configuration
  3. Quick start
  4. Menu and Toolbar Options
  5. Developer's guide
  6. Troubleshooting and Support

Installation

Configuration

'Report4j' is usually installed in C:\Program Files\Report4j. All references in this section are relative to the install directory.

Database setup

  1. Download and install the appropriate JDBC driver for your database.
  2. Also copy the JAR into the external directory within the install directory.
  3. Create a file inside the config directory with the extension .classpath. Add a single line of text to this file: external/yourjarfile.jar and save it.

Database property files

  1. Inside the config directory, you should find a file called enquiry.properties
  2. Enter the details surrounded by ****. Note that the email settings are only required for sending error reports and are not absolutely necesary.
  3. There is a sample properties file here.

Look and feel

The application will defaults to the native look and feel. To specify a differnet look and feel, set the environment variable report4j.lf to the class name of the l&f you prefer.

Program options

-d The directory to search for properties files. eg. java -jar ApplicationExecutor.jar -d ~/.report4j

Quick start

Running the Application

The installation process installs several shortcuts for running the application:

Running Reports

Creating a new Report

Menu and Toolbar Options

Most menu options have a shortcut key as listed below.

Menus

File

Connect: Opens a dialog which allows you to enter a Driver, database url, username and password. This dialog will open automatically if you try to run a report without a connection.

Disconnect: Drops the current connection

New CTRL-N Creates a new report template. Allows the user to enter SQL statements to run on the current connection.

Open CTRL-O Opens an existing report template which can then be run or edited.

Save CTRL-S Saves the current report template... Opens a file chooser dialog.

Print CTRL-ALT-P Prints the current report.

Preview CTRL-P Opens the current report's PDF document.

Clear CTRL-X Clears the report.

Exit ALT-F4 Exits the application.

Edit

Details Allows the user to specify a title and subject for the report. Also allows column names to be altered.

View

Switch View CTRL-R Switches between horizontal and vertical layout.

Run

Run ALT-ENTER Executes the current SQL statement or runs the current report.

Developer's guide

API and javadocs

[To follow...

.query files

Format

These are plain text files with 5 or more lines:

  1. Report title
  2. Descriptive text explaining the report
  3. Column headings (separated by ';')
  4. Column widths (separated by ';')
  5. The SQL to generate the report.

Example

  1. Addresses
  2. Addresses
  3. Code;Address;Country
  4. 50;120;70
  5. select a.id,
  6. a.address,
  7. c.description
  8. from address a
  9. join country c on (a.country_id = c.id)

Notes:

The query may be split over several lines if desired. The application expects lines 5 and up to contain SQL.

Interfacing with the application

[To follow...]