How to save Crystal ODBC Password for SQL Drivers


(Scott Mason) #1

I created a new DSN for Epicor 10 with the ODBC Driver 13 for SQL Server. It connects successfully.

So now when creating the crystal report I’ve got it to the point where the crystal report can use this new DSN as a datasource for some subreports. Great.

The only problem I’m running into is that when the report is run the viewer pops open a prompt to input the password. There does not seem to be a way to save the password on the DSN. How do I embed the password into the Crystal report so the prompt doesn’t appear?

This is the prompt

password-not-saved

I’ve tried adding items to the registry under for this DSN here:
[HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI\E10-TEST]
[HKEY_CURRENT_USER\SOFTWARE\ODBC\ODBC.INI\E10-TEST]

I added LogonID and Password but that didn’t work and the same prompt appears.
If I type the password at the prompt the report runs just fine.


(Steve Erboe) #2

Did you get this working


(Scott Mason) #3

No I don’t think we ever did. We abandoned the effort and shifted gears to create web-based reports with PHP. Sorry I couldn’t be more helpful.


(Steve Erboe) #4

Thanks Scott, I did find the resolution in case anyone else is trying to do this.

You can use the following connection string to get by this issue.

Connection String:Driver=SQL Server Native Client 11.0;Server={servername};Database={DatabaseName};Uid={username};PWD={password};


(Calvin Krusen) #5

FWIW -

  1. Make sure you are using the 32bit ODBC on the client
    (found at C:\Windows\SysWOW64\odbcad32.exe)
  2. We have to use the driver “SQL Server” over “SQL Server Native Client 11.0”. Using the “Native Client” one sometimes returns blank fields (all rows of the column) for ones we know to have data in (like Part.PartDescription).
  3. The dates returned by “SQL Server” are formatted “yyyy-mm-dd”