Skip to Content
0

Unable to set schema name for odbc connection(HANA db)

Jan 05, 2017 at 05:22 AM

64

avatar image
Former Member

SAP Crystal Reports

Unable to set schema name for odbc connection(HANA db)

I am new in development.

I am unable to fetch data from databse(Schema) that I set runtime for Crystal report 14.0.

It is fetching data from first schema of hana db and not taking what i passing it dynamically through code.

I am doing wrong????

My code

ReportSource = new CrystalDecisions.CrystalReports.Engine.ReportDocument();
ReportSource.Load(RPTFileName);

CrystalDecisions.Shared.ConnectionInfo crConnectioninfo = new CrystalDecisions.Shared.ConnectionInfo();
crConnectioninfo.ServerName = "hana";//DSN name

crConnectioninfo.UserID = "SYSTEM";

crConnectioninfo.Password = "password";

crConnectioninfo.DatabaseName = "dbname";

foreach (CrystalDecisions.CrystalReports.Engine.Table dTable in ReportSource.Database.Tables)
{

CrystalDecisions.Shared.TableLogOnInfo logOnInfo = dTable.LogOnInfo;
logOnInfo.ConnectionInfo = crConnectioninfo;
dTable.ApplyLogOnInfo(logOnInfo);

}

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

0 Answers