cancel
Showing results for 
Search instead for 
Did you mean: 

Crystal report ODBC connection

Former Member
0 Kudos

On crystal report when i change the connection runtime to the report on sap hana DB the report continue to work in the latest schema, crystal report doesn't have refreshed the new databese name.

There are some solution?????

0 Kudos

Hi Tommaso,

How you are changing connection at runtime? are you using replaceconnection() of RAS SDK?

-Kedar Kale

Former Member
0 Kudos

HI, no for changing connection runtime to crystal report i use this procedure, but in my opinio isn't correct.

connectionInfo.ServerName = serverName;
connectionInfo.DatabaseName = databaseName;
connectionInfo.UserID = userName;
connectionInfo.Password = password;
connectionInfo.IntegratedSecurity = false;
connectionInfo.Type = ConnectionInfoType.CRQE;
 

foreach (CrystalDecisions.CrystalReports.Engine.Table table in reportDocument.Database.Tables)
 {
 string tableName = table.Name;
 TableLogOnInfo tableLogonInfo = table.LogOnInfo;
 
 tableLogonInfo.ConnectionInfo = connectionInfo;
 table.ApplyLogOnInfo(tableLogonInfo);

}

For change connection using RAS SDK there are some example?
Former Member
0 Kudos
connectionInfo.ServerName = serverName;
connectionInfo.DatabaseName = databaseName;
connectionInfo.UserID = userName;
connectionInfo.Password = password;
connectionInfo.IntegratedSecurity = false;
connectionInfo.Type= ConnectionInfoType.CRQE;
 

foreach (CrystalDecisions.CrystalReports.Engine.Tabletablein reportDocument.Database.Tables){string tableName =table.Name;
 TableLogOnInfo tableLogonInfo =table.LogOnInfo;
 
 tableLogonInfo.ConnectionInfo = connectionInfo;table.ApplyLogOnInfo(tableLogonInfo);}Forchangeconnectionusing RAS SDK there are some example?

Accepted Solutions (1)

Accepted Solutions (1)

former_member203619
Contributor
0 Kudos

While the table connection method works for most regular databases, for Hana I would recommend going the property bag method. An example can be found here:

https://apps.support.sap.com/sap/support/knowledge/public/en/1535347

(This is a .NET sample - but the technique applies to java as well).

A java sample can be found here:

http://www.forumtopics.com/busobj/viewtopic.php?p=796627

The tricky part will be to find out what the property bags are, and what the values for those should be. To do that, instead of setting the propertybags, change the sample code to loop through the existing propertybags and print out the values for them. That will let you know what to set.

Shawn

Answers (0)