Crystal Reports prompts for DB logon

Posted on 2014-02-10
Last Modified: 2014-02-19
In visual studio Crystal Reports prompts for DB logon. The catch is it only does it when my platform target is in x64 mode but if i'm in x86 there is no prompt and the report shows up fine.

This is what I have installed:
Installed components
What can I do to have the x64 version not prompt for a logon.
Question by:ButtonDownBobby
  • 5
  • 4
LVL 18

Expert Comment

ID: 39848703
You probably have ODBC DSN created correctly on the 32 bits machine. On the 64 bits machine you need to create DSN using  this exe:

LVL 40
ID: 39849051
If you are using a .mdb Microsoft Access database, you cannot compile for x64. You need to compile for x86.

Author Comment

ID: 39850131
We have an ODBC DSN created using %windir%\SysWOW64\odbcad32.exe. Also we are using SQL Server 2005.
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

LVL 18

Expert Comment

ID: 39850757
Are you using the same user on both machines? Crystal will no ask you for credentials if it is able to connect to the database. With ODBC connection this means that you need to have a DSN set to work with a connection with integrated security. I can see 2 possible reasons to have DB Login dialog shown:
1. The user who is logged in on the 64 bits machine does not have permissions to connect to the database
2. The DSN on the 64 bits machine is not using integrated security

Author Comment

ID: 39851099
The user we use to log into the DB is the same for everyone.

Another thing is that when I publish the application in x64 the reports work on most of the machines. I think this has something to do with the crystal report runtime on my machine and the machines that have the same issue... I've upgraded my own to 13.0.8 with no change in results.
LVL 18

Expert Comment

ID: 39851519
How do you pass the password for this user ? ODBC DSN does not include the password.

Author Comment

ID: 39853478
It's through ODBC DSN called "TDEV"
rptReport.DataSourceConnections[Inti].SetConnection("TDEV", "TDev", "user", "Password");

Open in new window

LVL 18

Accepted Solution

vasto earned 500 total points
ID: 39853592
My guess is that your code doesn't work. Try another viewer and if it works with the current DSNs on both 32 and 64 bit machines you should look into your code.

Assisted Solution

ButtonDownBobby earned 0 total points
ID: 39858912
We found the solution to the problem. It  turned out that we had to set the odbc dsn in system32. We only had it set for syswow.

Author Closing Comment

ID: 39869801
I don't know why the 64 bit version of our code required a 32 bit ODBC DSN but, it did...

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How to join on ID, with prefix? 15 60
SQL Help 27 45
Send SMS from VB via Sierra Wireless Modem 2 22
MailAddress in vb 4 16
IP addresses can be stored in a database in any of several ways.  These ways may vary based on the volume of the data.  I was dealing with quite a large amount of data for user authentication purpose, and needed a way to minimize the storage.   …
Welcome my friends to the second instalment and follow-up to our Minify and Concatenate Your Scripts and Stylesheets (…
In a recent question ( here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question