User Guide
Contents
- Installation
- Configuration
- Quick start
- Menu and Toolbar Options
- Developer's guide
- Troubleshooting and Support
Installation
- Please read all instructions in this section through once before doing anything!
- Visit the project page and download the most recent installer.
- Run the installer by double-clicking it.
- Click the 'Next' button remembering to accept the license agreement until the process completes.
- Press the 'Finish' button to complete the process
- The application is now installed on your PC!
- If you have any problems during the install, see the Troubleshooting and Support section.
Configuration
'Report4j' is usually installed in C:\Program Files\Report4j. All references in this section are relative to the install directory.
Database setup
- Download and install the appropriate JDBC driver for your database.
- Also copy the JAR into the
externaldirectory within the install directory. - Create a file inside the
configdirectory with the extension.classpath. Add a single line of text to this file:external/yourjarfile.jarand save it.
Database property files
- Inside the
configdirectory, you should find a file calledenquiry.properties - Enter the details surrounded by
****. Note that the email settings are only required for sending error reports and are not absolutely necesary. - 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:
- Desktop
- Start Menu
- Quick Start Menu
Running Reports
- Run the application and select menu option or press CTRL-O.
- You are presented with a file dialog which allows you to select a query file to load.
(These normally end in
.query) - After loading the query, press ALT-ENTER or to run it.
- The results appear in the table as shown.
Creating a new Report
- Run the application and select menu option or press CTRL-N.
- Type an SQL statement in the
Querysection of the user interface. - Select menu option or press ALT-ENTER to run it.
- If you have not already connected to a database, you will be prompted for a username and password.
- The report appears in the results section.
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:
- Report title
- Descriptive text explaining the report
- Column headings (separated by ';')
- Column widths (separated by ';')
- The SQL to generate the report.
Example
- Addresses
- Addresses
- Code;Address;Country
- 50;120;70
- select a.id,
- a.address,
- c.description
- from address a
- 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.