Note that there are some explanatory texts on larger screens.

plurals
  1. POReplace a database connection for subreports with JRC
    primarykey
    data
    text
    <p>Since I'm using a newer release of JRC a replacement of database connection information do not work any more. I've no idea why. This code worked with a JRC version from last autumn (unfortunately I don't have a release number):</p> <pre><code>ReportClientDocument doc = new ReportClientDocument(); doc.open("report.rpt"); IDatabase db = null; // get sub report database // we'll overwrite the database connection information within // the chosen report. Map&lt;String, String&gt; bag = new HashMap&lt;String, String&gt;(); bag.put("Connection URL", "jdbc:oracle:thin:@LOCALHOST:1521:DATABASENAME"); bag.put("Server Type", "JDBC (JNDI)"); bag.put("Database DLL", "crdb_jdbc.dll"); bag.put("Database Class Name", "oracle.jdbc.driver.OracleDriver"); for (Object table : db.getTables()) { updateTable(dhb, dc, (ITable)table, bag); } </code></pre> <p>...</p> <pre><code>private void updateTable(DatabaseController dc, ITable table, Map&lt;String, String&gt; bag) throws ReportSDKException { ITable t = (ITable)table.clone(true); LOGGER.debug(t.getName()); LOGGER.debug("1: " + t.getConnectionInfo().getAttributes()); IConnectionInfo connInfo = t.getConnectionInfo(); connInfo.setUserName("UserX"); connInfo.setPassword("xxxxx"); connInfo.setAttributes(new PropertyBag(bag)); // LOGGER.debug("ConnInfo Kind: " + connInfo.getKind()); t.setConnectionInfo(connInfo); // t.setName(((ITable)table).getName()); t.setQualifiedName("UserX" + "." + table.getName()); dc.setTableLocation(table, t); LOGGER.debug("2: " + t.getConnectionInfo().getAttributes()); } </code></pre> <p>I get this error: 'Fehler bei der Suche nach JNDI-Namen (UserY)'. That means JRC can not find given JNDI name.</p> <p>Does anyone knows some changes between those JRC releases? And does anyone knows a solution?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload