pentaho-report-designer

Dynamic database connection in pentaho report designer


I am new to Pentaho report designer. I am working on generating huge number of reports using a sample database locally available. once we move to the production i ll have to change all the report database connection credentials individually . Is there a way to configure the database connection in one place and use the same in all reports?


Solution

  • You can setting/ write JNDI connection and then use this connection in your each report.

    1. During report development, you can write JNDI connection in your PC HOME location like "C:\Users\User\ .pentaho\simple-jndi\default.properties"
    2. After deploy report in pentaho server, you require to create same JNDI connection from your pentaho server with same JNDI name. Pentaho server JNDI file location is like "D:\pentaho\pentaho-server\pentaho-solutions\system\simple-jndi\jdbc.properties"

    Sample JNDI connection information for Oracle:-

    oracleAbc/type=javax.sql.DataSource
    oracleAbc/driver=oracle.jdbc.driver.OracleDriver
    oracleAbc/url=jdbc:oracle:thin:@localhost:1521:chaucerdb
    oracleAbc/user=scott
    oracleAbc/password=abc$123
    

    After that you can use this ConnectionName as your JNDI connection in report.

    Let me know if you need any other help.