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