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

Server Has not Yet been Opened to SQL Server 2k

Status
Not open for further replies.

Interwizard

Programmer
Nov 9, 2001
18
US
I've read lots of other threads regarding this topic, been to the Cyrystal Support Site and read those entries and even looked over a FAQ or two, but I'm still stumped...
I have a VB6 App Using Crystal Reports 8.5 into a SQL Server 2000 DB. When I kickoff the ViewReport method of the report viewer, i get the Server has not yet been opened, error message. Here is a sanple of my code:

Set crxReport = crxApp.OpenReport(strReport, 1)
Set crxExpOptions = crxReport.ExportOptions
Set crxSubReport = crxReport.OpenSubreport("PO BreakDown")
Set crxSubParam = crxSubReport.ParameterFields.Item(1)
Set crxSubReport2 = crxReport.OpenSubreport("Shipping Instructions")

'We iterate through the tables stored in the report (and subreports) to set the login info.
For Each crxTable In crxReport.Database.Tables
crxTable.SetLogOnInfo strSQLSERVER, strDBName, strSQLID, strSQLPASS
Next

For Each crxTable In crxSubReport.Database.Tables
crxTable.SetLogOnInfo strSQLSERVER, strDBName, strSQLID, strSQLPASS
Next

For Each crxTable In crxSubReport2.Database.Tables
crxTable.SetLogOnInfo strSQLSERVER, strDBName, strSQLID, strSQLPASS
Next

crxReport.DiscardSavedData
crxSubReport.DiscardSavedData
crxReport.RecordSelectionFormula = "{IPOXMIT.PONUM} = '" & CurrentPO & "'"
crxSubParam.AddCurrentValue CurrentPO
crxSubReport.EnableParameterPrompting = False
crxSubReport.SQLQueryString = "SQL STUFF, I won't bore you with it."
crxView.ReportSource = crxReport
crxView.ViewReport
crxView.Zoom 90



Does anyone have any ideas? I use the direct access drivers into SQL Server. I tried converting the report to use OLEDB instad and that didn't work any better.

Thanks in advance!
Bill Dodd
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top