cancel
Showing results for 
Search instead for 
Did you mean: 

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

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

former_member183750
Active Contributor
0 Kudos

I assume that the upgraded app works on your development computer(?). If that is the case, then probably the quickest way to troubleshoot this will be to install CR 2008 on that computer (just to troubleshoot the issue and we'll uninstall once we are done). Once CR 2008 is installed, see if the report can run in the designer. If not, it will be much easier to see what needs to be done to the report in the designer to make it work, that working this from the runtime.

Ludek

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

This problem is occurring in our Dev environment, the production will not be upgraded until system integration has been proven. So production is still running CR XI R2, but everything else about Dev and production are the same.

I can open the reports on a workstation, using either the Dev or Production environment as data sources, and this works ok, as expected, seeing as the reports have not been changed. The only change that has occurred is the installation of CR2008 runtime and .NET references change. I see nothing in the CR2008 docs about connection methods changing or did I miss something.

Many thanks

Tony

former_member183750
Active Contributor
0 Kudos

You are correct in that there are no database connectivity changes in CR 2008.

If you do not have SP0 for CR 2008, download it from here:

https://smpdl.sap-ag.de/~sapidp/012002523100007528552008E/cr2008_sp0.zip

If that does not help, I'd like to check if the correct dlls are loading when using CR 2008. To do that, download the modules utility from here:

https://smpdl.sap-ag.de/~sapidp/012002523100006252802008E/modules.zip

Then do the following:

1) unzip the download

2) Run the app with the CR 2008 references

3) get the error. leave the error on the screen

4) Start modules

5) Go to the File menu, select New List -> Memory Modules

6) Expand "By process"

7) Find the app exe (or the .NET dev env)

😎 Click on that

9) Go to the View menu and select Details

10) Look to see if there are any dlls loading form the CR XI r2 directory (c:\Program files\Business Objects\Common\3.5\bin)

Ludek

Former Member
0 Kudos

Hi,

When I run the 'Check For Updates' in CR 2008 Designer it says there are none, but I have applied SP 0 to my Dev workstation anyway. Is there an SP 0 for the Runtime which I should install on the server, can't see one on the SAP site?

I've used the 'Module' util and can see no references to previous versions of CR, all DLL are from 12. Also I've now uninstall CR XI from the dev environment.

Thanks again,

Tony

Former Member
0 Kudos

[Runtimes|http://resources.businessobjects.com/support/additional_downloads/runtime.asp] for you.

Works?

Regards,

AG.

Former Member
0 Kudos

Thanks, but that is the same version that comes with the original, unpatched, CR 2008 (12.0, Prod Version 12.0.0.683)

I'm after SP0 for RunTime only, or any hotfixes, are there only hotfixes out for the Designer?

Former Member
0 Kudos

Hi,

One step forward, the issue seems to only occur on reports that contain sub-reports.

Regards

Tony

Former Member
0 Kudos

Hi,

Ignore my last post, soz. It seems work no problem with newly created reports that contain sub-reports, but is not working for old reports regardless of if they contain subreports or not. The old reports have been loaded into CR2008 and re-saved, but they still refuse to work. I use the same code for the old and new reports alike.

Regards

Tony

Former Member
0 Kudos

After much messing around and trying every possible combination of SetDataSource, LoginProperties, CustomAttributes..etc it looks like the CR2008 runtime runs under the wrong security context (Process instead of thread!), as it all started working as soon as I granted 'Network Services' access to my SQL DB, even though I'm using Integrated security, ASP.NET thread is impersonate user and IIS with Integrated security running in own App pool.

Previously I had CR IX R2 install, with same IIS config, same .NET config, same RPT, same code, nothing changed and as long as the user was granted access to the SQL DB, all worked as expected. Then upgraded to CR2008 and it only works if I allow 'Network Services' access!

Well that was fun, so much for SSPI and CR2008.

Has anyone had any success with CR2008 runtime running though ASP.NET with SSPI?

Regards

Tony

Former Member
0 Kudos

How did you add Network service to SQL user?