GOR




INTRODUCTION


GOR was my BSc (Bachelor of Science) final year project and was implemented in the Spring of 2002. In my placement year (the previous year) I spent a lot of time programming Java Servlets for a company called Amacis.  A high percentage of this Servlet programming was creating custom HTML based database reports.  This give me the idea for my final year project which was to create a web based system which a user could log onto, create a connection to a database, produce queries in a query-by-example style and have basic WYSIWYG report formatting.  To make this reporting system "Generic" it had to be run anywhere in the world, connect to any JDBC compatibly database and have the ability to run reports in any language.  All this had to be achieved using HTML and JavaScript so it could be run from a standard web browser.

I have recently dug out the source code to this project and modified it slightly.  Changes include adding an ANT build file, eclipse project files and the ability to be easily deployed in WAR file format.


DOWNLOADS


gor.zip - Zip file containing GOR project which consists of source code, WAR file / data directory for deployment, ANT scripts, eclipse configuration files, etc.

Thesis - PDF of final year project.


INSTALLATION


The original GOR code has been modified to make installation much easier (deployable WAR file is now available).  The following is taken from the "readme.txt" file which is included in the "gor.zip" file.


 1.  Extract gor.zip file onto the filesystem.

2.  Ensure that a webserver that is capable of running Java web applications
    (WAR files) is installed.

        E.g. tomcat 6.0


3.  Copy the gor.war file to the deploy directory of the webserver (usually
    webapps).

        E.g. c:\tomcat\webapps.


4.  Copy the \gor\gor data folder somewhere.  E.g.
   
        c:\tomcat\gor
   
    This folder should contain 3 data sub directorys. E.g.
   
        c:\tomcat\gor\database
        c:\tomcat\gor\reports
        c:\tomcat\gor\system

5.  Set the GOR environment variable to point to this directory. E.g.

        GOR=c:\tomcat\gor

    This can be done in several ways, I prefer to update the starup batch
    file of the webserver.  E.g. in tomcat update the c:\tomcat\bin\catalina.bat
    file.  Look for following line...
   
        set JAVA_OPTS=%JAVA_OPTS%  ....
   
    and add
   
        -DGOR="c:\tomcat\gor"
   
    to the end of the line.

6.  Start the web server.

7.  Access to the GOR webapp is now possible using the following web address ...
   
    http://localhost/gor/Logon
   
    or
   
    http://localhost:8080/gor/Logon

    ... and log on using the following username and password.
    
    Username: admin       
    Password: admin


QUICK GUIDE


1) If you were successful you should see the following on your web browser.




2) This should log you into the system.  Before you can create a report you have to create a connection to a database server you have running.  This may involve copying a JDBC driver (e.g. hsqldb.jar) into the lib folder of you webserver and restarting.  The following screenshot shows me creating a HSQLDB database connection to a JOGRE games server.




3) Once a database connection file has been successfully created the next step is to create a new report.





4) A blank report is now created using the database connection we defined earlier.  The first thing we do is define the tables of the database query.  Here we are adding 3 tables and an alias for each.




5) If more than one table is defined we must declare the join relationships between the tables.




6) The next step is to define which fields are being included in the query and optional sorting fields and conditions.  The following query only includes games which rating is greater than 1000 and is sorted by username.
 



7) You can test this query is valid by clicking on the Test button.  It shows the selected columns, the SQL statement generated from the user input from the previous 3 forms and a table of data which will be used in the report.




8) Before you can run a report a set of labels must exist.  Labels can be defined in one or more languages.  The following are the labels for English.




9) To ensure that report is not just a big two dimensional table of data we can supply grouping levels which group the data so that labels are not repeated.  Here we are grouping by Username, Game Key and rating.




10) The report can now be run by clicking on the "Run" menu option.




11) As you can see the report has run successfully and is using English labels.  However our report at the minute looks boring and messy.  All visual aspects of the report, such as fonts, font sizes, colours, lines, spacing, etc can be formatted in the following screen.  This screen uses JavaScript very heavily and updates itself in a real-time WYSIWYG manner.




12) As you can see the report (shown here in full screen mode) looks much better after being formatted.




If you have any questions / queries about GOR then do not hesitate to ask me.
Comments