Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Crystal Reports LogOnServer Error

Status
Not open for further replies.

MudMan2000

Programmer
Dec 18, 2002
10
0
0
CA
In our dev environment (W2K, Crystal 8.0) our .asp code works fine. In the production environment (W2K, Crystal 8.0) we get the error "Incorrect Log On Parameters" when calling the LogOnServer method of the Crystal Application object. We have also tried using the SetLogonInfo method of the table objects used by the report; this method does not error but when the report is run we still get the same problem.

Code:
Set Session("oApp") = Server.CreateObject("Crystal.CRPE.Application")

session("oApp").LogOnServer "pdsodbc.DLL", CStr(strODBCName),"" , cstr(userid), cstr(password)

We've confirmed we're passing the correct string variables for these parameters. The only difference between our dev environment and production is that the dev environment also includes Visual Studio 6.0 and SQL Server 2000 (the production site points to a SQL Server on a different box).

DESPERATE FOR HELP!!!!!
 
Often, this sort of problem is a rights problem. The account that runs the application must have rights to SQL server. Also, verify that the ODBC connection is properly configured on the dev box and can be seen by the account that runs the application.

Are you using the Automation Server (CPEAUT32.dll) rather than the RDC? It would appear so based on your CreateObject call. If so, that is not a good choice going forward...
 
Hi there. Thanks for the reply! The ODBC connection is fine; our web application uses the same one to access the database and it works fine. When running the report in the crystal environment we use the same ODBC connection there as well and it's also fine.

We can look at moving to the RDC for this application, but we'd prefer not having to redevelop it unless there is no other choice. And if we do, we'd probably go to a more stable tool like ComponentOne. This is an existing application that is being redeployed and we just need to get it working asap.

Any other ideas or suggestions? (And thanks again by the way)
 
Hi again. In reading through Crystal's documentation, they don't recommend using RDC over the web and instead recommend the Report Application Server (which requires a rather large licensing fee) so I don't think that's going to work as a solution.
 
Take a look at this article. It may point you in the right direction. It's for CR 7, but the technologies used in CR 7 and CR 8 are similar. Sorry I can't give you a better answer, but you're using an older technology I can't model, so I'm limited in what I can suggest.


Another thought: have you installed CR 8 on the web server, or just specific dll's? If you've installed CR 8, can you open the report and run it on the server? If you've only installed specific dll's, you may be missing a dll Crystal requires for connectivity (like p2sodbc.dll).
 
I'll read through the article right away but thought I'd respond to your other question: yes we did install crystal on the web server and the report runs fine in the crystal environment. I noticed the ref to the p2sodbc.dll in the method call, but that dll does not exist in our dev environment (which works fine) or in the production environment; no such dll got installed with crystal . . .
 
Hi again. I looked at the doc you sent; those are access/jet DLL's that the article mentions, so I dont think theyll help us (its a SQL Server database we're connecting to) - unless I'm misunderstanding something which is also entirely possible.
 
Actually, it was items 1 - 9 in the synopsis of the problem that I thought might be relevant to you.

As for p2sodbc.dll, it should be installed in the windows\system32 folder. Crystal shouldn't be able to connect to the db without it, if you are actually using odbc to connect to the database. And CR 8.5 Designer won't even open correctly without having p2sodbc.dll installed. So, somethings amiss here.

You can verify this by doing the following:

On your development pc, open and run the report in CR 8. Then, use the modules.exe utility to examine the dll's in memory for the crw32.exe process. You should see the p2sodbc.dll listed. You can view the details to see where it is installed.

Assuming you actually are using p2sodbc.dll, you could have a rights problem because sometimes the account running the web servcie, and thus Crystal when the web calls it, doesn't have access to windows\system32 folder. The fix, if I recall properly, is to run the web service under an account that has rights to that folder.
 
Hi again. This is bizarre but true, and we've verified it. If you run the Crystal 8.0 install with Typical selected (instead of complete/custom), none of the crystal objects work properly until you reinstall the SAME installation again. We've done this on clean W2K Server boxes 3 times now, and the identical thing occurs each time. Must be an issue with their installation. Anyways its working now, so we're not about to mess with it. Thanks for all your help!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top