Skip to Content

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

Incorrect CrystalDecisions.CrystalReports.Engine.Table.Location

Hi All,

I'm doing a project where my report developer team is developing reports in Crystal reports XI.

This report use oledb provider to connect to sql server 2000.

I have tables name like

"abcowner.xyztable"

"pqrowner.xyztable"

so same table in different owner/schema.

Crystal report is using "pqrowner.xyztable" and it runs fine in crystal report.

I'm have embedded this report in asp.net 3.5 and using 11.5.37.0 runtime. When this report is run in asp.net application using

CrystalDecisions.CrystalReports.Engine.ReportDocument() , it's using table in different schema i.e. "abcowner.xyztable".

I have to manually change the location of the table to point to correct owner. I can't fix like this becuase the application wouldn't know which owner/schema to pick.

foreach (CrystalDecisions.CrystalReports.Engine.Table crTable in crTables)

{

crTableLogonInfo = crTable.LogOnInfo;

crTableLogonInfo.ConnectionInfo = crConnectionInfo;

string strLocation = crConnectionInfo.DatabaseName + "SCHEMA/OWNER." + crTable.Location.Substring(crTable.Location.LastIndexOf(".") + 1);

crTable.ApplyLogOnInfo(crTableLogonInfo);

crTable.Location = strLocation;

}

Any suggestion ?

Thanks

Thanks in advance.

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