Skip to Content
Former Member
Dec 07, 2016 at 09:04 PM

Change connection with Server authentication


I am running SP16 with VS 2013, using C#. I also have CR Designer 2013 installed. MS SQL Server 2014, using provider SQLNCLI11, OLE DB connection type.

I have a Windows application that launches a Crystal Report. I used Don Williams' utility to get the correct properties set when changing the connection info. It is necessary to change the connection when the report is moved from the Test environment to a customer's environment. The idea is that the connection info is updated and saved the first time a customer runs the report. After that, the report launches as if it had been built in the customer's environment.

For the last few months, this has been working successfully. As long as the SQLServer is set to use Windows authentication, it doesn't matter if the report was built with Integrated Security, or if a username and password were specified--the report would launch just fine, I could change the connection info, and save the changes to the report.

A couple of weeks ago, we started testing with the SQLServer set to use Server Authentication, and a DB logon box started to pop up, showing the correct (new) server instance and database name grayed out, showing the username as editable, and asking for the password. The password had been set as part of changing the connection info, so this definitely confused me. I tested using reports that needed the connection changed, and reports that were set to my specific connection so no change was needed. And the DB logon box popped up. I tried a report that was built with Windows authentication, and the DB logon box still popped up. This makes me think that the box is coming from the server rather than the report. And why is it disregarding the password that is being passed? Maybe my expectations are incorrect.

Bottom line is that I need to be able to run reports without having the DB logon box pop up and prompt for the password. I need to be able to do this whether the server uses Windows or Server authentication. Right now our reports are built with Windows authentication. If the server is set for Windows auth, no logon box shows. If it's set for Server auth, the logon box shows.

Is there something I'm missing, or is this a capability that isn't available in CRVS?