cancel
Showing results for 
Search instead for 
Did you mean: 

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

Former Member
0 Kudos

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.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi John,


Please specify BusinessObjects product version(with patches if any)?

Are the reports managed or unmanaged?
What is the behaviour from CR designer, are you able to refresh report after changing datasource from Cr designer?

Try to run the attched code and let me know if it works.


Thanks,

Prithvi

Former Member
0 Kudos

Hello Prithvi,

SAP BusinessObjects BI Platform 4.1 Support Pack 5

Version: 14.1.5.1501



can you elaborate managed or unmanaged  reports - we're attempting to access them in Java.

When I try to access report using crdb_jdbc driver its not able to access.

open the connection.

ADMIN_ROLES []

---- Error code:0 [CRWEB00000119]



I tried with your code its giving the same error.

Failed to open the connection.

10884_11980_{5B04FF74-24AF-409E-850D-0C677F25B5FC}.rpt---- Error code:-2147482892

Former Member
0 Kudos

Hi John,

Unmanaged reports are the reports which are not published to BusinessObjects enterprise system.

Managed reports are those which are created using CR designer and then published to BO system.

Can you test whether you are able to point your report to the new database connection from crystal reports designer 2013?

Thanks,

Prithvi

Former Member
0 Kudos

Hello Prithivi,

I am using Managed reports, reports are published to BO system.

Yes, I am able to connect reports from crystal report designer with new database connection.

can you let me know which way is beneficial unmanaged reports or managed reports, our purpose to have reports are on demand reports from different server.

how the licensing handle on unmanaged reports.