Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Troubleshooting
Research
Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

Crystal 8.5 and VB6 - Server has not yet been opened error

Avatar of speshulk926
speshulk926Flag for United States of America asked on
Crystal ReportsVisual Basic Classic
8 Comments1 Solution10365 ViewsLast Modified:
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
  Next

  crxRpt.DiscardSavedData

  crxRpt.EnableParameterPrompting = False
  frmReportViewer.CRViewer1.ReportSource = crxRpt
  frmReportViewer.CRViewer1.ViewReport
  frmReportViewer.Caption = colreport.Description
  frmReportViewer.Show vbModal
  Set crxRpt = Nothing
ASKER CERTIFIED SOLUTION
Avatar of speshulk926
speshulk926Flag of United States of America image

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Commented:
This problem has been solved!
Unlock 1 Answer and 8 Comments.
See Answers