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 gkittelson 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 1

Status
Not open for further replies.

lunchbox88

Programmer
Feb 17, 2004
208
US
Crystal 8.5, Access, VBA...

I can open a report in the CRViewer where the tables are on a SQL Server, but if I want to open a report where the tables are in an Access DB on my local machine, I get the "Server has not yet been opened" error. I'm new to using the CRViewer, and not quite sure what's wrong, or what the settings should be. There's no username or password for the database because it's on my local machine.

any help is greatly appreciated.

Thanks!
 
Can you post the code you're using, as well as your Crystal version, and the method of connectivity the report(s) are using (Native, ODBC, ADO, etc.)?

-dave
 
Code:
Set crxRpt = crxApp.OpenReport("c:\reports\report1.rpt")
'Setting the ReportSource of the CrViewer control to the Report object
Me!CRViewer5.ReportSource = crxRpt
'view the report.
Me!CRViewer5.ViewReport
'do events first before continuing in order to avoid application crashes
While Me!CRViewer5.IsBusy
    DoEvents
Wend

The reports I'm building in CR 8.5
 
What about the connectivity?

If the report was designed against a SQL datasource, it will try to connect to the same server/db that it last connected to, unless told to do otherwise. Open the report in the CR Designer, and use Set Location (Database menu > Set Location) to point the report to your Access db, save it, then try it again with your code above.

-dave
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top