How to pass the database username and password in Crystal Reports/Crystal Enterprise 10?
Posted on 2005-03-17
I have created several reports using crystal reports 10 and SQL Server for the data source. The reports are being deployed using Crystal Enterprise.
I have created a DSN to the SQL Server database on both my local PC and on the Crystal Enterprise server. When setting up the DSN, we selected the authentication option for “With SQL Server authentication using a login ID and password entered by the user". A standard user name "crystal" was created in the database on the SQL Server.
To publish report I used the Crystal publishing wizard. After publishing the report I try to run it via Crystal Enterprise and upon running, a dialog box is displayed requesting a username and password. Is there any way to pass the username and password information (either in the report or on the Crystal Enterprise server) so that the user is not presented with the login dialog box?
In the past, we utilized Crystal Report Application Server (RAS) to deploy the reports and we modified by adding the following code to clientDoc.databaseController.logon "<your user name>", "<your password>" the interactiveViewer.asp, pageViewer.asp and partsViewer.asp files to passed the username and password.