I have VB application that manages a SQL Server 2000 database. I also use a CRViewer control to allow the user to view and change reports designed in Crystal Reports 7.0.
The reports display fine, however when a user clicks on the refresh button it displays the following error message: "Server has not yet been opened". I don't understand why because I open a connection to the SQL server in the standard code module using this code:
Sub main()
'Creates Connection
Set conSubscription = New ADODB.Connection
'Opens connection
conSubscription.ConnectionString = "Provider=SQLOLEDB.1;" & _
"Integrated Security=SSPI;" & _
"Persist Security Info=False;" & _
"Initial Catalog=Subscription;" & _
"Data Source = SERVER"
conSubscription.Open
frmMain.Show
End Sub
I think the problem might have something to do with SQL server authentication because when I refresh the report in Crystal Reports, it ask me logon before it will refresh.
Does anyone know how to pass that information on to Crystal Reports from VB?
I did alot research myself and found a good article here:
support.crystaldecisions.com/communityCS/ TechnicalPapers/cr_server_not_yet_been_opened.pdf.asp
But is is geared more to problems with ASP.
Does anyone have any idea what I am doing wrong?
Thank you in advance for any suggestion.
Timoteo
The reports display fine, however when a user clicks on the refresh button it displays the following error message: "Server has not yet been opened". I don't understand why because I open a connection to the SQL server in the standard code module using this code:
Sub main()
'Creates Connection
Set conSubscription = New ADODB.Connection
'Opens connection
conSubscription.ConnectionString = "Provider=SQLOLEDB.1;" & _
"Integrated Security=SSPI;" & _
"Persist Security Info=False;" & _
"Initial Catalog=Subscription;" & _
"Data Source = SERVER"
conSubscription.Open
frmMain.Show
End Sub
I think the problem might have something to do with SQL server authentication because when I refresh the report in Crystal Reports, it ask me logon before it will refresh.
Does anyone know how to pass that information on to Crystal Reports from VB?
I did alot research myself and found a good article here:
support.crystaldecisions.com/communityCS/ TechnicalPapers/cr_server_not_yet_been_opened.pdf.asp
But is is geared more to problems with ASP.
Does anyone have any idea what I am doing wrong?
Thank you in advance for any suggestion.
Timoteo