Skip to Content

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

CR2008:Failed to open the connection. Failed to open the connection.<Report

Hi,

I've just upgraded from Crystal XI R2 to Crystal 2008. All my reports open happily in Crystal 2008. I have also deployed the Crystal 2008 runtime to a Windows 2003 SP2 R2 server running ASP.NET 1 and ASP.NET 2. Before the Crystal 2008 runtime was installed on top of the already present Crystal XI R2 Runtime I could view RPT files via the .NET report viewer (version XI). Now that Crystal 2008 runtime is installed I receive an error message when I try to view the reports, again, via the .NET report viewer (version 12), although no code has changed apart from all references changed from XI to 2008.

Code is:

CrystalDecisions.CrystalReports.Engine.ReportDocument oReportDocument = new CrystalDecisions.CrystalReports.Engine.ReportDocument();

oReportDocument.Load(sReportFilename);

Tables oTables = oReportDocument.Database.Tables;

foreach (CrystalDecisions.CrystalReports.Engine.Table oTable in oTables)

{

TableLogOnInfo crTableLogOnInfo = oTable.LogOnInfo;

crTableLogOnInfo.ConnectionInfo.IntegratedSecurity = true;

crTableLogOnInfo.ConnectionInfo.DatabaseName = "DB" ;

crTableLogOnInfo.ConnectionInfo.ServerName = "server" ;

oTable.ApplyLogOnInfo(crTableLogOnInfo);

}

CrystalReportViewer1.ReportSource = oReportDocument;

this.DataBind();

Error message is: 'Failed to open the connection. Failed to open the connection'.

Any help would be great.

Regards

Tony

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