BackPrevious Page Next PageNext

Configuring in a Standalone Environment

Configuring on the JReport Administration page

Configuring in the dbconfig.xml file

When JReport Server is running in a standalone environment, you can configure the database for it remotely on the JReport Administration page. Also, since the server database configuration information is stored in the dbconfig.xml file in the directory <install_root>\bin, you can also configure the server database in this file. When you first install JReport Server it will be using the Derby database by default. It is better to change the database while installing if you have the information to do so. If you are currently using Derby it needs to be changed using one of the following procedures. Do not use Derby in a production environment.

The following presents the two ways of configuring the server database in a standalone environment:

Configuring on the JReport Administration page

  1. Log onto the JReport Administration page, click Data on the system toolbar and then select System DB, Realm DB, or Profiling DB from the drop-down menu to open the corresponding Data page.
  2. Select a realm if you are configuing the realm or profiling database from the Select Realm drop-down list at the top right corner.
  3. In the Configuration tab, select a DBDriver from the Driver drop-down list.

    For Microsoft SQL Server 2005 and later versions, select the driver com.microsoft.sqlserver.jdbc.SQLServerDriver from the drop-down list; select com.microsoft.jdbc.sqlserver.SQLServerDriver for versions earlier than Microsoft SQL Server 2005.

    Configure System DB

  4. In the Driver Class Location text field, type or click the Browse button to specify the location for the driver class.

    For HSQLDB and Derby databases, you do not need to specify the driver class location. For all other databases, you will have to provide the driver class path information unless it has already been added to the class path of setenv.bat (setenv.sh on Unix) file during installation or by editing the setenv.bat file.

  5. Type a valid URL that can be used to establish a connection to the database. The valid format of the URL should be provided by the DBDriver vendor.
  6. Provide the user ID and password.
  7. To test the connection, click Test. To update the database configuration and to apply the settings, click Update and then restart the server to finalize the function. All previously published reports and all other information on users, groups and roles will be lost when you restart.

Configuring in the dbconfig.xml file

In dbconfig.xml, you can configure the server database using one of two methods. One is to specify the URL, driver, user and password individually. This method of configuration can be modified through the JReport Administration page. For example:

<database name="systemtables/realmtables/profile">
    <url>...</url>
    <driver>...</driver>
    <user>...</user>
    <password>...</password>
</database>

Note: The <user> and <password> information is encrypted. The <user> and <password> tags will be replaced by the <encrypt-sign> tag after JReport Server's startup as follows:

<encrypt-sign>enDkq7srM9cHhoUwzYXJ3NvcDIYk</encrypt-sign>

If you want to change user or password, delete the <encrypt-sign> tag and add the <user> and <password> tags in the dbconfig.xml file.

The other is to use the <datasource> tag. For example:

<database name="systemtables/realmtables/profile">
    <datasource>
        jdbc://user:password@jdbc:odbc:jreport-realmtables#driver=sun.jdbc.odbc.JdbcOdbcDriver
    </datasource>
</database>

Here are two examples for your reference:

Notes:

BackPrevious Page Next PageNext