# Genesys Quality Management Suite 8.1.520 : Configuring Advanced Reports Using the config-reports Script

The `config-reports` script is run either as part of initial callrec-setup process to configure the database link for advanced reports, or if the administrator changes the database pool to re-sync database settings between Genesys Quality Management Suite and advanced reports.

The config-reports script must be run after every change of the Quality Manager database pool.

If the `callrec-scorecard-reports` rpm package is installed on a configured system or during a callrec-setup configuration the system is configured automatically by a config-reports script.

The config-reports script takes database pool settings from core.xml and configures according to them

`/opt/callrec/web/webapps/reports/_Definitions/_Settings.lgx` file of Advanced Reports:

    /opt/callrec/web/webapps/reports/_Definitions/_Settings.lgx.

### Usage

To synchronize database connection settings between GQM and Advanced Reports:
Log in to the Call Recording Server that Quality Manager runs on .

Log in as `admin`. Enter `su -` to log in as the root user. Enter the password, the default is`zoomcallrec`.

`/opt/callrec/bin/config-reports` as user root without any parameters, or with `-h` for user help display.

### Result

Exit code 0 if everything went okay. Exit code`1` if there is an error.

### Example Output

PostgreSQL or Oracle is enabled and everything went okay:

    Database pool 'scorecard' found in /opt/callrec/etc/scorecard_business.xml.
    Oracle database found.
    File /opt/callrec/web/webapps/reports/_Definitions/_Settings.lgx updated for using Oracle at 192.168.11.111.

No database configured in core.xml (in this case, configure the database service first):

    Database pool 'scorecard' found in /opt/callrec/etc/scorecard_business.xml.
    No 'scorecard' pool found in /etc/callrec/core.xml. Nothing changed!

Possible problem, if there is no scorecard pool defined or a user other than root is used:

    Unable to get dbPool for scorecard in /opt/callrec/etc/scorecard_business.xml!

### Connecting to the database

Connection tag for PostgreSQL in /opt/callrec/web/webapps/reports/_Definitions/_Settings.lgx file:

    <Connection ID="GQM" Type="PostgreSQL"
    PostgreSQLServer=[host] PostgreSQLDatabase=[dbName]
    PostgreSQLUser=[userName] PostgreSQLPassword=[password] />

ConnectionString tag Oracle in /opt/callrec/web/webapps/reports/_Definitions/_Settings.lgx file:

    <Connection Type="JDBC" ID="GQM"
    ConnectionString="JdbcDriverClassName=oracle.jdbc.OracleDriver;JdbcURL=Jdbc:
    oracle:thin:@[host]:[port]:[dbName];user=[userName];password=[password]" />