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

"Server not yet opened" using CR8, VB6 and RDC.. HELP!

Status
Not open for further replies.

NipsMG

Programmer
Dec 27, 2000
215
US
I'm totally baffled here.

I wrote a program that houses about 5 or 6 reports, all of which get their data from ADO Recordsets using Field Definition Files (TTX Files).

On the development machine, all of the reports load and run fine.. However, on ANY OTHER MACHINE, The reports do not load.. The report viewer form loads up, and says "Server has not yet been opened.".

I've tried copying over and registering all of the DLL's from the \program files\seagate software\Report Design Component\ files over to the target computer. I've also tried copying all of the dll's from the Crystal folder to the target machine, but I am still unable to open the reports, getting the same error.

Does anyone have any idea why this is happening and/or how to fix it?

By the way, both machines have VB6Sp3, Cr8 and MDAC2.5 installed.

Thanks in advance.

--NipsMG s-)
 
I ran into the same problem a couple months ago...here is what I got from Seagate...


The reason you are receiving this error is most likely because you are not logging on to you SQL Server at runtime. You would use the SetLogonInfo method of the table object to do this. Below is an example of how to use SetLogonInfo. Please note that if you are connecting Natively as opposed to via ODBC you will pass the Server Name as the first argument in place of the DSN Name:

***************************************
SetLogonInfo CRAXDRT
***************************************
Private Sub mnuSetSubReport_Click()

Dim crSub as CRAXDRT.Report
Dim cnt as Integer
Dim crSecs As CRAXDRT.Sections
Dim crSec As CRAXDRT.Section
Dim crRepObjs As CRAXDRT.ReportObjects
Dim crSubRepObj As CRAXDRT.SubreportObject
Dim crDB As CRAXDRT.Database
Dim crDBTables As CRAXDRT.DatabaseTables
Dim crDBTable As CRAXDRT.DatabaseTable


'crRep and crSub are report objects declared earlier. crRep
'is the main report, crSub will be set to each subreport as it is found

'Set the Logon Info for the main report
Set crDB = crRep.Database
Set crDBTables = crDB.Tables
For Each crDBTable In crDBTables
Call crDBTable.SetLogOnInfo("DSN","Database","UserID","Password")
Next crDBTable

'Find the subreports in the report
Set crSecs = crRep.Sections
For Each crSec In crSecs
Set crRepObjs = crSec.ReportObjects
For cnt = 1 To crRepObjs.Count
If lcrRepObjs.Item(cnt).Kind = crSubreportObject Then
'open the subreports and SetLogOnInfo for each table
Set crSubRepObj = crRepObjs.Item(cnt)
Set crSub = crRep.OpenSubreport(crSubRepObj.SubreportName)
Set crDB = crSub.Database
Set crDBTables = crDB.Tables
For Each crDBTable In crDBTables
Call crDBTable.SetLogOnInfo("DSN","Database","UserID","Password")
Next crDBTable
End If
Next cnt
Next crSec
End Sub
******************************************************************************************

The report files do not maintain the userID/Password information within them...therefore, you must provide this information prior to opening the reports with the CRViewer. My solution was to put a user ID and encrypted password into an INI file and read them prior to calling the SetLogonInfo method.

Hope this helps.

don:)
 
Don,

The DB source is an ActiveX Data Definition File (look under More data sources/ActiveX in the Add Database screen). I pass an ado Recordset to the report to use as a table. (I don't need to log onto a sql server).

This code works correctly on the development machine, the reports are populated correctly... However for some reason on every other machine I get this error message.. and... since for some GODFORSAKEN REASON CRYSTAL ISN'T SUPPORTING 8.0 OVER THE PHONE ANY MORE!!!!!!!!!!!!!!!!!!! *takes deep breath*.... %-( so I have to figure this out on my own :-(

Anyone else got any ideas?

Thanks!

--NipsMG
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top