cancel
Showing results for 
Search instead for 
Did you mean: 

Save password for opening .rpt within crystal reports

Former Member
0 Kudos

I have Crystal Reports connected to a database on a server in our organization. When I created the DSN to connect it had me provide database credentials and it tested ok. I can open any .rpt created but upon doing so it always asks for the DB username and password. This is not much of a hassle for me as I have access to the DB but for other users who are going to be grabbing this report this will not work for them and I would prefer that it did not prompt just to open/read a report.

I have been doing research and tried to implement a couple fixes such as making a File DSN I could share with the credentials stores into it and then connecting with it in Crystal Reports or adding a connection string with my credentials but I do not get any errors just prompted for the username and password as If i had not made any changes.

I am slightly stuck as how to move forward and would greatly appreciate any assistance or direction.

I am not loading this into a webpage but the reports will be opened from a application called MiSys if there is another workaround provided by that program.

Accepted Solutions (1)

Accepted Solutions (1)

DellSC
Active Contributor
0 Kudos

Crystal will NOT save the password inside the .rpt.  Also, the password you entered in the ODBC configuration does not get saved there either - it's used for testing the connection and making sure it can connect to a "valid" datasource.

So, MiSys will need to use the Crystal SDK to set the database password for the report prior to opening it.  See the home page of this forum for links to sample code for how to do this.

-Dell

0 Kudos

Another option is if your database supported NT Authentication when you connect to the DB using the Database Wizard there is an option to enable Trusted authentication. This way it uses the info in the Database to validate if the user has access. It uses their log on info in the Domain.

If the DB does not support it then no way, that would be a huge security issue, image anyone getting once of your reports, once logged on they could do all sorts of bad things...

Don

ido_millet
Active Contributor
0 Kudos

Another option is to use one of the 3rd-party Crystal Reports viewers (see list at http://kenhamady.com/bookmarks.html) that provides integrated authentication (Remember Me) functionality.

0 Kudos

Is this the correct samples link or is there a better one?
https://community.sap.com/resources/code-samples

DellSC
Active Contributor
0 Kudos

No, that is not the correct link. Please look at the links in the SAP Crystal, Version for Visual Studio wiki.

Also, in the future, please don't comment on an old question looking for an answer - please post a new question.

Thanks!

-Dell

Answers (1)

Answers (1)

Former Member
0 Kudos

Jordan-

I'm having this same problem. Were you ever able to figure this out?

Thanks-

Heather

0 Kudos

All of the options are posted, for security reasons CR will not and never has saved the password.

If using Integrated Security we also fully support Database and Table level security, so if using Trusted Authentication the  user running the report requires permissions to access all tables the report uses.

Don