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

Crystal ODBC logon

Status
Not open for further replies.

ratman

Technical User
Jun 26, 2000
143
US
In Excel I have a userform with an CRVIEWER1 viewer on it.
My code loads an existing .rpt report to the viewer fine.
Export, printing and all other functions on the viewer(stop,search,navigation etc.) also work fine.
All those functions work without any code.
PROBLEM is the refresh does not work.
Crystal Information message box appears with a "Server is not yet opened" message when lightning bolt is clicked.

I have unsuccessfully tried to log onto the server several different ways; before loading the viewer; after loading the viewer; on refresh button click...Our Crystal 8.5 version uses an ODBC to a Synergy database and works fine.

Here's the code:

Private Sub UserForm_Initialize()
Set CRXApp = CreateObject("CrystalRuntime.Application")
Set CRXRep = CRXApp.OpenReport(thepath & "\" & thedir & "\" & repname)

ERROR OCCURS NEXT ! (if I remove this code I still receive the Crystal Information message box with the-"Server is not yet opened" message when lightning bolt is clicked.)

CRXApp.LogOnServer dllname, servername, databasename, userid, password

------------------------
I also tried using the report instead of the application.

CRXRep.Database.LogOnServer dllname, servername, databasename, userid, password
-------------------------
I returned all the values via code...see below:

dllname "pdsodbc.dll"
servername = "Synergy Driver"

databasename = I was unable to return this ? ...I know the Table(1) returned this table name "PUBLIC.CP_SHPLIN"
I have tried to leave the databasename value empty with just the , also.

userid "ems"
password "ems_admin"
---------------------------
I used this line with no error:
CRXRep.Database.Tables(1).TestConnectivity

Thank you for any help on this,

David Rattigan Thank you,
Dave Rattigan
 
>if I remove this code I still receive the Crystal Information message box with the-"Server is not yet opened" message when lightning bolt is clicked

Try the Keyword Search on this Forum for "Server is not yet opened". A few days ago there was a thread about that very problem.
Good Luck! [thumbsup2]
WindUp
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top