Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

com.crystaldecisions.sdk.occa.report.lib.ReportSDKServerException: Failed to open the connection. Failed to open the connection.

Use the sample program for connecting crystal report by passing database connecting parameters, its giving

Error 10884_9404_{0F3C851E-1913-40C5-8403-94B834395DF6}.rpt---- Error code:-2147482892 [CRSDK00000000] Error code name:failed

  at com.crystaldecisions.sdk.occa.report.lib.ReportSDKServerException.throwReportSDKServerException.

4.0 BI server version.

Code.

//Obtain collection of tables from this database controller.
Tables tables = databaseController.getDatabase().getTables();

//Set the datasource for all main report tables.
for (int i = 0; i < tables.size(); i++) {

ITable table = tables.getTable(i);

//Keep existing name and alias.
table.setName(table.getName());
table.setAlias(table.getAlias());
//Change properties that are different from the original datasource.
table.setQualifiedName(TABLE_NAME_QUALIFIER + table.getName());
//Change connection information properties.
IConnectionInfo connectionInfo = table.getConnectionInfo();
//Set new table connection property attributes.
PropertyBag propertyBag = new PropertyBag();
//Overwrite any existing properties with updated values.
propertyBag.put("Trusted_Connection", "false");
propertyBag.put("Server Name", SERVERNAME); //Optional property.
propertyBag.put("Connection String", CONNECTION_STRING);
propertyBag.put("Database Name", DATABASE_NAME);
propertyBag.put("Server Type", "JDBC (JNDI)");
propertyBag.put("URI", URI);
propertyBag.put("Use JDBC", "true");
propertyBag.put("Database DLL", DATABASE_DLL);
connectionInfo.setAttributes(propertyBag);
//Set database username and password.
//NOTE: Even if these the username and password properties don't change when switching databases, the
//database password is *not* saved in the report and must be set at runtime if the database is secured. 
connectionInfo.setUserName(DBUSERNAME);
connectionInfo.setPassword(DBPASSWORD);
connectionInfo.setKind(ConnectionInfoKind.SQL);
table.setConnectionInfo(connectionInfo);
//Update old table in the report with the new table.
databaseController.setTableLocation(table, tables.getTable(i));
}

can anybody help on this.

Former Member
Not what you were looking for? View more on this topic or Ask a question