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 wOOdy-Soft 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 yet been opened (Crystal report viewer control)

Status
Not open for further replies.

Vandita

Programmer
Jul 3, 2001
8
US
I am trying to open a crystal report via the
crystal report viewer control. The report
uses an ODBC connection to sql server
database. When I run the project with the form that
hosts the CRViewer control I am getting an
error message saying "The server has not yet
been opened".

Is there a way to open a connection via the
CRViewer.
I am able to this with Access but not with SQL...
 
Hi,

Have you defined the ODBC link on the host PC?

Geoff
 
Yes I have defined that but still it is giving the same error.
 
Ensure that the client machine has the required DLL's for database access (see appropriate help files). Also ensure that the code you are using to set up the report also passes the log-on information for the database tables ( I work against a SQL server database and need to pass the server-name, database-name, user-name and password).
 
Steven Can u tell me what are the required DLL's for it. I have passed the information like server name and all. but it gives error immediately after CRViewer1.ViewReport.
 
I'm afraid I can't recall the DLL's but they are listed in the 'RunTime.hlp' file in the Seagate Software folders. I think they include 'p2sodbc.dll', 'p2ssql.dll' for starters.
Hope you're able to obtain the list as required.
Steve
 
You can use the VB Package Wizard to build a kit and it will show you what DLLs will be scooped up for your application. But...a missing DLL will probably generate another type of error, not "server not opened".

You could post the code that you use on the VB form to run the report. Brian J. Alves
Terrier Consulting, Inc.
Email: brian.alves@worldnet.att.net
VB / Crystal / SQLServer
 
You may also consider indicating the location for the Crystal Report Database Tables. I run my application on a number of servers, different database names and have code (Delphi 5) such that I have to set the location of each of the tables that are used.
I.e :
If (CRReport.Database.Tables.Name = 'Table1') then
begin
CRReport.Database.Tables.Location := 'DATABASE-NAME.dbo.TABLE1';
end;
Are you also passing the database-name, user-name and associated password along with the server-name for the connection ?
Steve
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top