NO.1 JNDI connection using the principles

  1. In the Report Designer to use JDBC to connect to the database, create a database connection, and then create a dataset using SQL or other methods, making better use of data collection reports, and then establish a connection to the database from JDBC connection into JNDI connection, save the report template and deploy to weblogic server.
  2. Reports server configuration data sources.
  3. Modify the application web.xml file under WEB-INF.

So that you can browse through a WEB browser to use the report of the JNDI data sources.

NO.2 Our oracle 10g data source produced an example to illustrate the template jndi.cpt

  1. Report Designer create reports:In the designer using JDBC to connect to oracle 10g database, using the data in the database table student produced the following template jndi.cpt:
    finereport报表数据集

    Back to the definition of a data connection panel, previously defined database connection becomes JNDI connection, set the JNDI name for the oracle
    Modify the report data connection

    Save the template to the application directory under weblogic 10 WebReport / WEB-INF / reportlets, save for jndi.cpt. At this point the server side data source is not configured, start the server and access the jndi report shows an error similar to the following:
    The data source is not configured error

  2. Server-side configuration data sources:Open weblogic control interface 10: http: // localhost: 7001 / console; login weblogic server domain select the domain structure | Services | JDBC | Data Sources to open the data source configuration interface:
    weblogic 10 control interface

    Lock and edit the interface, a new data source, set new data source JNDI name for the oracle (ie, the production of the template definition JNDI name), select the database type and drive click “Next”, as shown below:
    New data source jdbc

    Transaction options according to their requirements definition, in this default, click “Next”
    Configure the connection properties: database name, URL, user name and password, weblogic 10 to establish a physical connection oracle 10g
    Configure the jdbc datasource properties

    Testing just defined data source connection: Before weblogic server configuration will show us good data source, and provides the connection test, click on the “Test Configuration” pop-up message “connection test was successful,” explained configured correctly, click “Next”
    Deploy the new JDBC data source: Select the data source you need to deploy a server, click the “Finish”
    Deploy jdbc datasource

    Server-side data source configured, the application after deployment can be configured to activate the connection with the oracle database through “oracle” This bridge (JNDI name)

  3. Modify the application WebReport / web.xml file under web-inf:
    Between …… add the following sentence:
    Modify the web.xml file
  4. Fully configured, you can access the JNDI data source for the report.
    access the JNDI data source