I have a few different reports that are called from a vb6 application. They currently connect directly to the tables they need the info from for the report and I decided to convert from that to stored procedures. I have my stored procedure ready and working and added it to my report. It showed the fields that I put in there and I added them to my report. I verified that report works using the username/password that my program uses to access the database inside of Crystal Reports and all looks good there.
I didn't change anything in my code that was previously working. Theoretically, by adding that stored proc, nothing should have changed. However, now when I try to execute the report, I'm getting "Server has not yet been opened." Does anyone have any suggestions on fixing this or has seen this before?
Dim crxRpt As CRAXDRT.Report
Dim crxApp As New CRAXDRT.Application
Dim crxTable As CRAXDRT.DatabaseTable
Set colreport = colReports(cboReport)
Set crxRpt = crxApp.OpenReport(App.Path & "\" & colreport.Filename)
For Each crxTable In crxRpt.Database.Tables
crxTable.SetLogOnInfo gtServer, gtDatabase, gtUserName, gtPassword
crxRpt.EnableParameterPrompting = False
frmReportViewer.CRViewer1.ReportSource = crxRpt
frmReportViewer.Caption = colreport.Description
Set crxRpt = Nothing