cancel
Showing results for 
Search instead for 
Did you mean: 

Crystal Report 2008 results "Password did not match error" in SQL Server Log

Former Member
0 Kudos

Hi,

I am trying to develop some crystal reports using Crystal Report 2008 SP4 to connect to SQL server 2008 through RDO (ODBC). My problem is that anytime Crystal Report is trying to establish a connection with SQL Server, first it tries to connect with the wrong password and results the following error message in SQL Server log:

Login failed for user 'peyman'. Reason: Password did not match that for the login provided. [CLIENT: 192.168.2.198]

The login name 'peyman' is the right one as I have quoted the same in setting up ODBC System DSN using "SQL Server Native Client 10". But somehow Crystal Report is taking its chance and trying to connect before prompting me for the password. After this error logged to SQL server side, I can see Crystal Report pops up the prompt to enter DSN password. After supplying password to this prompt, Crystal Report works fine and pulls the data and renders the report without having any more incorrect password error logged to SQL Server.

The attached file shows the step I am taking to regenerate the issue. I need this to be fixed as anytime uses any of these reports and tries to render it with crystal runtime engine the same error message raises in SQL Server side and logged in the log file.

Thanks,

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member183750
Active Contributor
0 Kudos

See if updating to SP 6 will help:

https://share.sap.com/a:328ro3/MyAttachments/9aa22691-9773-4d64-b904-62775b5fec33/

- Ludek

Senior Support Engineer AGS Product Support, Global Support Center Canada

Follow us on Twitter

Former Member
0 Kudos

Hi Ludek,

Thanks for sharing SP6 installation release. I did try this version and still could see the same error message appearing in SQL server log. Then I upgraded to SP7. Still I have the same issue. I even tried to delete ODBC system DSN and create a new one and create a new test crystal report from scratch. But I was not lucky enough and still having the same problem.

I really appreciate if you follow this up and find me a fix as soon as you can.

Thanks again,

Peyman

former_member183750
Active Contributor
0 Kudos

I see that you are using "SQL Server Native Client 10". Can you confirm that you are using MS SQL 2008? E.g.;

For OLE DB then use:

MS SQL 2005 - OLE DB Provider

MS SQL 2008 - SQL Native 10

MS SQL 2012 - SQL Native 11

MS SQL 2013 - SQL Native 11

For ODBC then use:

MS SQL 2005 - SQL Native

MS SQL 2008 - SQL Native 10

MS SQL 2012 - SQL Native 11

MS SQL 2013 - SQL Native 11

- Ludek

Former Member
0 Kudos

Hi Ludek,

Per SQL Server log our server version is:

Microsoft SQL Server 2008 (RTM) - 10.0.1600.22 (X64)

  Jul  9 2008 14:17:44

  Copyright (c) 1988-2008 Microsoft Corporation

  Standard Edition (64-bit) on Windows NT 6.0 <X64> (Build 6002: Service Pack 2)

and as you noticed I am setting up DSN using Native Client 10.

Thanks,

former_member183750
Active Contributor
0 Kudos

Umm, ok - got it I think...

CR designer is 32 bit, so you must use a 32 bit ODBC datasource connection. See KBA 1505620

- Ludek

Message was edited by: Ludek Uher

Former Member
0 Kudos

Hi Ludek,

I did not have any experience with UDL before. But I managed to make one and use it in my test report. I can connect to database through UDL but It exactly does the same as System DSN and generates the same error message in SQL Server Log each time a new session to database needs to be established.

I also tested SQLCONN32 program. I could connect to database when I choose the setup System DSN through the following menus:

Server -> Driver Connect

Server -> Simple Connect

But the last option "Server -> Silent Connect" did not work as my password was not saved in System DSN. Here is SQL Server error I received on trying the silent connect:

Login failed for user ''. Reason: An attempt to login using SQL authentication failed. Server is configured for Windows authentication only. [CLIENT: 192.168.2.198]

To answer you last question, I do user 32 bit version of ODBC by launching:

C:\Windows\SysWOW64\odbcad32.exe

Thanks,

Peyman

former_member183750
Active Contributor
0 Kudos

So, nothing can connect to the database. Not UDL, not ODBC from a third party that does not use any CR  APIs (sqlconn32). You will have to go to your db admin and ask them what's going on...

- Ludek

Former Member
0 Kudos

Hi Ludek,

I am not sure how we ended up here. What I meant on my last reply is that I can connect by UDL in crystal report but it causes the same error message in SQL server like using 32 bit System DSN. Again while this error message logged in SQL (as soon as the password pops up in crystal developer), I can put the password in and report pulls the data from database. So my issue since start is not that report can not pull the data. The data will be pulled upon filling in the password, but somehow crystal developer tries to connect to database before prompting for the password and that is how I have one more entry of "Login failed for user 'peyman'. Reason: Password did not match that for the login provided. [CLIENT: 192.168.2.198]" logged into my SQL server log. Although please note that the delphi app that you wanted me to test works fine with the database though the system dsn and does not generate error message in SQL server log.

Thanks,

0 Kudos

Hi Peyman,

I think you guys are sidetracking the issue, UDL won't make any difference.

Do you have any Verify Database options enabled in the Report, check for them by opening the report in CR Designer then File, Report Option. If there are any checked then uncheck them and test again.

And do you have any SQL Expression in the report, if so these are DB dependent so CR must connect to verify the functions are available.

Also, make sure your runtime is version 12.0.7.xxxx, some older versions of CR 2008 did try to verify the database using a blank password.

SP 7 is available, but where you get it is questionable.. we are still trying to make them public.

Don

Former Member
0 Kudos

Hi Don,

Thank you for engaging in this conversation.

First of all I checked the verify option. There was one checked mark for "Verify on First Refresh" which I took it off but it did not make any difference. I have attached my report option screenshot for your reference.

On your point whether I have SQL expression, I do not know what to check. But for your reference I have just made a simple report based on a table and only pulled one of the field to the report. I have attached a snapshot of developer screen when I tried "Shoq SQL Query" menu.

On your note about making sure runtime is version 12.0.7.xxxx, I am doing this tests on a machine that has crystal developer 2008 upgraded to SP7. I was thinking on this particular machine crystal runtime does not play any role while the full developer is installed. Although I do not know where to download runtime 12.0.7.xxxx to install it on my client machines once this issus is fixed. If you can provide me a download I really appreciate it.

Last but not least, I have followed a few comment chain on your website when I was looking for service pack upgrades and found the following link which let me download SP4 and SP7:

http://service.sap.com/sap/bc/bsp/spn/bobj_download/main.htm

Thanks,

Peyman

0 Kudos

Hi Peyman,

Runtime is include with CR SP 7 so you have it. I did the same test and SQL Profiler does not show CR is connecting until after you hit the refresh button and it prompts for the password. Then Profiler hows Crystal Reports connecting and passing in the SQL Statement.

This may be something in ODBC, try connecting via OLE DB, Paste in the Server name, User and Password and then select your table. Save the report and close the Designer then open the report up again, do you see in profiler CR connecting?

If so search for this kbase article and extract the crlogger attached to it for CR 2008 and enable logging. Lets see what it tells us:

1603398 - How to use crlogger to trace Crystal Reports?


In the log you'll see an error on the first few lines, ignore it, scroll down a bit and you'll see CR trying to connect to the DB and then if you are correct you should see it again. Copy the log file and use the Advanced Editor and attach to the case. Must be lest than 1meg file size, zip it up first if bigger and rename the file to *.txt then attach.


Don

former_member183750
Active Contributor
0 Kudos

Sorry - you're right - went side ways here. So I asked Don to take a look, get me back on track.

Results of our testing with CR 2008 SP 7 do not replicate the issue you are reporting. So, we'll get you to SP 7. If you see the issue there, create a new report - one field. See if you can repro the issue with this report. If not, what is the difference between this report and one that has the issue?

Link to SP 7 is here:

https://share.sap.com/a:328ro3/MyAttachments/83fe7fe5-e657-4ef2-903f-390ee91bf0a3/

- Ludek

former_member183750
Active Contributor
0 Kudos

Sorry, should have refreshed before answering. I was uploading the SP 7 to the ftp server... But it seems to me like we're kinda stepping over each other now. One thing I'd like you to is go to the Help Screen in CR. Then go to Help About. What version is reported here?

Also, confirm that a one field report has the same issue.

- Ludek

Former Member
0 Kudos

Hi Dan and Ludek,

Thank you for following on my issue last week.

I did uninstall my Crystal Report SP6 and used the installation shared by Ludek to install SP7 from scratch. I can see Help -> About menu is confirming I am on latest version. Then I recreated the report with one single field from a table from scratch in the new release. Unfortunately the problem is still happening. Then I activated crlogger as Dan suggested. I can see that after launching Crystal Report and opening the test report, as soon as I hit the refresh button, the database password prompt appears but even before typing the password crystal report tries to connect to database with the wrong password and results in the error entry I am challenged with in SQL server log. The attached is the result of crlogger right before putting the password in database prompt in Crystal Report. It confirms crystal report is connecting to database with right username ("KID_Epicor9_CR") and the wrong password ("1"). I have also attached a second instance of this log which is after putting the database password to the prompt and having the report rendered. You could easily see two instances of "SQLDriverConnect failed" on line 17 and "SQLDriverConnect succeeded" on line 31.

0 Kudos

Hi Peyman,

This is the way it should work, In CR designer when you open the report it does nothing. As soon as you hit the Refresh button then CR tries to use the connection saved with the report. It assumes what is saved with the report is a valid server and connection info. CR simply tries to verify the server is still active.

If you don't want it to fail in CRD then before opening any report Click the File, Log on Database option and connect. Now when refreshing reports it won't log the failed.

In the SDK it does the same thing, it assumes the Server info is the same and does try to connect to verify the Server does exist. It only takes a few milli-seconds to do this

To stop this from happening set the log on info first then it won't log the attempt to connect, it's checking to see if Trusted is allowed.

TIMESTAMP    THREAD_ID    FILENAME    LINE_NUMBER    LOGGED_DATA    LEVEL

2014-6-2 8:30:11.439    57320    .\QESession.cpp    444    Set Product View Locale: 4105    20

2014-6-2 8:30:11.439    57320    .\QESession.cpp    478    Set Preferred View Locale: 4105    20

2014-6-2 8:30:11.439    57320    .\QESession.cpp    500    Set Process Locale: 4105    20

2014-6-2 8:30:11.440    57320    .\qecommon.cpp    117    This property is currently in a read-only state and cannot be modified. File Name: ".\QEProperty.cpp". Line: 217    1

2014-6-2 8:30:11.967    57208    .\QESession.cpp    444    Set Product View Locale: 4105    20

2014-6-2 8:30:11.967    57208    .\QESession.cpp    478    Set Preferred View Locale: 4105    20

2014-6-2 8:30:11.967    57208    .\QESession.cpp    500    Set Process Locale: 4105    20

2014-6-2 8:30:11.968    57208    .\qecommon.cpp    117    This property is currently in a read-only state and cannot be modified. File Name: ".\QEProperty.cpp". Line: 217    1

2014-6-2 8:30:11.999    57208    .\QESession.cpp    444    Set Product View Locale: 1033    20

2014-6-2 8:30:12.4    57320    .\qecommon.cpp    117    This value is write-only. File Name: ".\QEProperty.cpp". Line: 145    1

2014-6-2 8:30:56.278    57208    .\odbcapi.cpp    301    Beginning COdbcapi::DriverConnect    20

2014-6-2 8:30:56.342    57208    .\odbcapi.cpp    335    Ending COdbcapi::DriverConnect    20

2014-6-2 8:30:56.342    57208    .\connect.cpp    2170    SQLDriverConnect succeeded: DSN = 192.168.13.172, User ID = sa, Password = ********    10

2014-6-2 8:30:56.348    57208    .\qecommon.cpp    117     File Name: ".\QEQueryInfo.cpp". Line: 826    1

2014-6-2 8:30:56.348    57208    .\qecommon.cpp    117     File Name: ".\QEQueryInfo.cpp". Line: 854    1

2014-6-2 8:30:56.348    57208    .\qecommon.cpp    117     File Name: ".\QEQueryInfo.cpp". Line: 826    1

2014-6-2 8:30:56.348    57208    .\qecommon.cpp    117     File Name: ".\QEQueryInfo.cpp". Line: 826    1

2014-6-2 8:30:56.348    57208    .\qecommon.cpp    117     File Name: ".\QEQueryInfo.cpp". Line: 854    1

2014-6-2 8:30:56.348    57208    .\qecommon.cpp    117     File Name: ".\QEQueryInfo.cpp". Line: 826    1

2014-6-2 8:30:56.348    57208    .\qecommon.cpp    117     File Name: ".\QEQueryInfo.cpp". Line: 854    1

2014-6-2 8:30:56.348    57208    .\qecommon.cpp    117     File Name: ".\QEQueryInfo.cpp". Line: 916    1

2014-6-2 8:30:56.348    57208    .\QERowset.cpp    1184    Beginning CQERowset::readFirstRecord    20

2014-6-2 8:30:56.348    57208    .\QERowset.cpp    2149    Beginning CQERowset::restart    20

2014-6-2 8:30:56.348    57208    .\QERowset.cpp    2370    Beginning CQERowset::execute    20

2014-6-2 8:30:56.353    57208    .\DbQueryBuilder.cpp    514    Query Targets: sqlncli10, ODBC3SQLServer    10

2014-6-2 8:30:56.353    57208    .\DbQueryBuilder.cpp    525    Successfully built query:    SELECT "Orders"."Customer ID", "Orders"."Employee ID"   FROM   "xtreme"."dbo"."Orders" "Orders"    10

2014-6-2 8:30:56.353    57208    .\odbcapi.cpp    875    Beginning COdbcapi::ExecDirect    20

2014-6-2 8:30:56.354    57208    .\odbcapi.cpp    884    Finishing COdbcapi::ExecDirect    20

2014-6-2 8:30:56.354    57208    .\rowset.cpp    220    SQLExecDirect succeeded:  SELECT "Orders"."Customer ID", "Orders"."Employee ID" FROM   "xtreme"."dbo"."Orders" "Orders"    10

2014-6-2 8:30:56.354    57208    .\QERowset.cpp    2814    bindToField succeeded: Orders.Customer ID is using client buffer    10

2014-6-2 8:30:56.354    57208    .\QERowset.cpp    2814    bindToField succeeded: Orders.Employee ID is using client buffer    10

...

Notice it doesn't try to connect first if I set the log on info first using code.

So nothing we can do to stop SQL server from logging this info. Check with the DBA, possibly they can "filter" out the application attempts to connect or change your work flow in the app.

If you have a Preview Button to view the report then simply add your Database log on info prompt there if Connectioninfo.Trusted is not true:

mainSecureDB = rpt.Database.Tables[tableIndex].LogOnInfo.ConnectionInfo.IntegratedSecurity;

if mainSecureDB = false then prompt the user for log on info and set accordingly, if it is true the it should not fail when it connects.

This is simply a matter of changing your App work flow...

Thanks

Don

Former Member
0 Kudos

Hi Don,

Thanks for the reply. I wish Crystal Report would not assume the connection is trusted in the start up and would let username and password be supplied before connecting to database. Unfortunately in my case I am trying to embed reports made up in crystal report designer to Epicor9 ERP. Epicor is not helping me to change the way they launch the crystal reports from their app.

I even tried a report from scratch in Crystal Report designer based on OLD DB (ADO) - SQL Server Native Client 10.0 and I had the same issue like ODBC RDO.

Now that I have the designer upgraded to SP7, is there any chance you can supply me a link to download CR Runtime in version SP7. I want to mke sure reports I do in designer from now on can be launched on my clients machine only using the runtime on the same version.

Thanks,

0 Kudos

Hi Peyman,

NO DO NOT APPLY ANY RUNTIME UPDATE TO YOUR EPICOR SOFTWARE....

This could potentially break their software, check with Epicor if CR patches can be applied.

Saving the report in CR 2008 with any SP should not make any difference. Only time it may is if we have made some change where the info is saved in the RPT file but only ones I know of are around printer info. But unless the application is using the new API it won't make any difference.

So unless Epicor changes their work flow nothing will help, except using Trusted Authentication mode but if the software does not test for this flag it won't help either...

Don