A dynamic connection is a group of connection properties that can be used to override the original data source connections in a catalog. Administrators can modify some of the original catalog connection properties, and then save these modified properties as a dynamic connection. For a dynamic connection, administrators can define a database user mapping table which is a table containing the columns: SID, database user, and database password. Then when an end user running a report, if there are dynamic connections available to his SID, the user can select a dynamic connection to apply. JReport Server manages dynamic connections in the server system database.
Dynamic connections are categorized at organization level. If the system administrator creates a dynamic connection, the connection is available to users that are not from any organizations. If an organization administrator creates a dynamic connection, the connection is available to users of the organization. If a dynamic connection is defined in an organization, all users/groups/roles must be from the same organization. If a connection is defined outside of all organizations, all users/groups/roles must be from outside of all organizations. System administrator can define, view and edit all the dynamic connections.
Developer users can also call API methods for using dynamic connections.
There are the following properties:
Property Name | Description |
---|---|
Date Format | Specifies the default Date format corresponding to the database. The Date format JReport supports follows that of Java. |
Description | Specifies the description of the connection. |
Driver | Specifies the class name of the JDBC driver such as oracle.jdbc.driver.OracleDriver. |
Is JNDI Data Source | Specifies whether it is a JNDI data source. |
JNDI Data Source Name | Specifies the JNDI data source name when the Is JNDI Data Source property is true. |
Name | Specifies the name of the connection which, by default, is the connection URL, but can also be a user friendly name for the connection. |
Name Pattern | Specifies whether or not catalog or schema is used in data manipulation. Choose an option from the drop-down list.
|
Read Only | Specifies the mode to open the connection to the JDBC data source. The initial setting is Default which uses the mode specified by the DBMSÂ Administrator which could be read only or read & write. Choose an option from the drop-down list.
|
Time Format | Specifies the default time format corresponding to the database. |
Timestamp Format | Specifies the default timestamp format corresponding to the database. The Timestamp formats JReport supports follows that of Java. |
Transaction Mode | Specifies the transaction mode for the connection. Choose an option from the drop-down list.
|
URL | Specifies the JDBC URL which establishes the connection to the database, for example, jdbc:oracle:thin:@localhost:1521:ORCL. |
User Defined Extra Characters | Specifies extra characters of user defined quote qualifier. |
User Defined Quote Characters | Specifies the quote character of user defined quote qualifier. |
Default Database User | Specifies the user name for connecting to the database, which is determined by the database DBA. Null means using the default database user name. |
Default Database Password | Specifies the password for connecting with the database, which is determined by the database DBA. Null means using the default database password. |
Within a dynamic connection, make sure that an SID is mapped to only one pair of database user and name.
The dynamic connection is then added in the dynamic connection table which consists of the following columns.
Column Name | Description |
---|---|
Catalog | Displays the catalogs of the dynamic connections with the full resource path, for example, /SampleReports/SampleReports.cat . |
Data Source | Displays the data source names of the dynamic connections in the catalog. |
Connection Name | Displays the dynamic connection names. You can click a connection name to edit the dynamic connection. |
SID | Displays the security identifiers (SID). An SID can be a group, a role, or a user in the JReport Server security system. |
Organization Name | Shows the organizations that the SIDs belong to. The column is available to system admin when the Organization feature is enabled. |
Database User | Displays the database user names of the dynamic connections. Null means using the default database user name. |
Database password | Displays the database passwords of the dynamic connections. The passwords are masked. |
Administrators can perform the following tasks for the dynamic connections in the dynamic connection table:
Sorting the dynamic connections
Dynamic connections can be sorted by columns except for Database Password in the dynamic connection table. To sort the dynamic connections by a column, click on the column name.
Searching for a dynamic connection
First select a search category from the drop-down list, then type the text in the text box and click to start the search. The x button in the text box is used to clear the input text. After the results are filtered, to return to the state before search, click x in the text box.
There are the following search categories:
For example, in order to find the dynamic connections which use the catalog SampleReprts.cat, you can select Catalog from the search category drop-down list and input sam as the keyword. JReport will search for sam in the Catalog column and the dynamic connections whose catalogs contain the text will be kept in the dynamic connection table.
Editing a dynamic connection
Click the connection name to open the Edit Dynamic Connection dialog, in which you can edit the properties of the dynamic connection as you want.
Deleting dynamic connections
Select the checkboxes ahead of the dynamic connections and click Delete above the dynamic connection table. To delete all the dynamic connections at a time, select the checkbox on the column header and click Delete.
When running a report or scheduling a task to run a report, if there are dynamic connections available to the log-in user, the user needs to select one. JReport Server then passes the changed connection properties of the selected dynamic connection into the Report Engine. The Report Engine will merge the changed properties with the other original catalog connection properties to setup the database connection.
One user can have multiple dynamic connections for one catalog data source, so when there are multiple dynamic connections for a log-in user: