Link to home
Start Free TrialLog in
Avatar of kkohl
kkohl

asked on

Crystal Login prompt for SQL Server

I have created several reports that access tables that reside in a SQL Server 2000 database.  I am running Crystal Reports 8.5 with the distribution feature installed.  The reports run great, its just that it prompts for the SQL Server login (for the ODBC connection) every single time the report is run.

I am trying to find out how to either embed, automate, or include the SQL Server login into the report itself, so that whenever the report is run, or refreshed, there is no login prompt...

MS Access has a check box for "save login" when linking the tables in the report.  Where is the comparable feature in Crystal?

Thanks,

KK

The ODBC connection is configured properly.  The reports work great.
Crystal is not remembering the login and password entered during the creation process, or when it is entered once for the same report.
For instance, if I run the report, I get the login prompt (SQL Server, Database, Username, Password)... no matter if I leave windows open, or whatever, if I try and refresh the report or run it again, I am hit with the login prompt again.

Is there any way at all to get this log in prompt eliminated?
Avatar of DRRYAN3
DRRYAN3

If you are using ODBC connections, I think that the ODBC manager control panel applet is where you should look.  If you are using the native SQL driver in Crystal Reports, Crystal will remember your login and password with the report.

DRRYAN3
Avatar of Vitor Montalvão
Yes you can.
Programmaticaly!

Before execute the CR report in your app, set the Connect property for the CR object that you are using.
If the database is different from the database that are used to create the report, you must SetLogonInfo for each object in CR.

Good luck,

Vitor Montalvao
You changed your question.  I'm out of here.

DRRYAN3
make sure that you run the report before you compile it.  it needs the data there to hold the connection.

TOM.
Avatar of kkohl

ASKER

** Sorry, DRRYAN3.  Yes, I edited the question after your comments.  I will only comment myself from now on.  My apologies. **

Vitor, I am not seeing any place to set the 'connection' for an object.  Very few of the objects have properties for me to look at.  The Set Location option (in the Database dropdown menu) has all the data I am looking to populate with exception of the password (Server Type, Server Name, DB, Username).  So, I am not sure where you are telling me to look...

Tom, that doesn't work for me.  I still get prompted for the login any time I have to refresh data (which is very often).  
Avatar of kkohl

ASKER

I appreciate everyone's help, though I am beginning to think saving the login information is something Crystal can't do.  I just have a hard time believing MS Access has something as simple as a check box to save the login information and Crystal doesn't have something as simple.
i know it can do it, we use it here.  that usually works for me.  did you save the report after you ran it and then try to make the compile.  you have to save it before you compile.

TOM.
Avatar of kkohl

ASKER

Yes, I have saved it.  It won't let me compile unless I save.  :-)

Hmm, Tom, your method does indeed work.  Yet, it is not what I am looking for.  It works awesome for a report that does not need to have its data refreshed.  However, if you need to refresh the data, bam, you are right back to a login prompt.

The way I have my reports written, I take out the option to save data with the report.  This way the user cannot make the mistake of running a report with non-updated data.

And no matter which way I turn, I am running up against the wall.
Did you get this fixed kkohl - I'm suffering the exact same problem in CR 9.0
you dont have to save data with the report...there might be an option you arent selecting.  do you answer no to the to prompts when you compile the report.  i know after you compile the report and run it, there is an option to refresh data or something like that.

TOM.
Avatar of kkohl

ASKER

L33, no, I have not solved this problem the way I would like to.
I set up a generic 'reports' user account.  All reports I compile use this generic user.
I don't like this way however, and am still looking to try and get the logins hardcoded somehow.
ASKER CERTIFIED SOLUTION
Avatar of TAshby
TAshby

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of kkohl

ASKER

Will give that a go, Tom.
Thanks
Avatar of kkohl

ASKER

To make this answer more clear it should address the term "Trusted Connection".
I created a new Global Group, added the necessary users, and gave public permissions on the SQL Server databases.
Then created an ODBC connection using 'Trusted Connection'.
When I write a report with the trusted ODBC, all login prompts disappear when running the report.

Thanks Tom, that was the prod I needed.