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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Server has not been opened

Status
Not open for further replies.

Eli20

Programmer
Oct 30, 2003
119
MX
hi, i have a vb6.0 application and a database in SQL Server 7.0, and i use Crystal Reports to generate my reports.
i use an ODBC driver to connect to my database, so i dont get any trouble if i change the database location. but yesterday, i had to put my database derver in another computer, i installed and i copyed my databases and everything, then i redirected the ODBC on the computer my program is to the new server. and my program works fine, but when i try to open the report i get an error "Server has not been opened" can anyone please help me??

i connect the report directly to the ODBC driver at desgin time.. do i need to do something at run-time??

thank you very much

Eli
 
A few questions:

1) What version of Crystal are you using and are you using the RDC for viewing the report?
2) Can you give a sample of the code you are using to logon to the database at runtime?
3) Are you sure your user rights are all the same on the new server as they were on the old server?
 
1.- im using Crystal report 8.0 in that program
2.- i connect the report to the ODBC at design time, i dont have any run-time code
3.- i think the user rights are the same.. but i need to check it, do you think that can be the problem??

thank you very much

Eli
 
Well, if you are using NT authentication in your odbc connection, I suppose you wouldn't need to logon to the database. I usually work from the assumption that people aren't using NT authentication. Are you using NT Authentication in your ODBC connection?
 
yes, i use NT authentication in my ODBC connection, but i dont think thats the problem, since the visual basic code can access to the database perfectly, the problem is when i try to open the reports..

im still looking for solutions.. thank You very much

Eli
 
Well, I cannot model NT Authentication on a different server than the one I'm using, so I can only guess here. I would suggest testing in your vb app just where Crystal thinks it is trying to log on. Before calling the viewer (I'm assuming you're using the RDC to launch your report), add the following code:

Dim crTable as CRAXDRT.DatabaseTable

For Each crTable in MyReport.Database.Tables
Debug.Print "Server: " & crTable.LogOnServerName
Debug.Print "Location: " & crTable.Location
Debug.Print "DatabaseName: " & crTable.LogOnDatabaseName
Debug.Print "UserID: " & crTable.LogOnUserID
Next


If these aren't looking for the server where you think it ought to be looking, you should be able to change the settings use the Database | Set Location option in Crystal Reports.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top