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