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

Problem using Crystal Report Viewer

Status
Not open for further replies.

robinsql

Programmer
Aug 2, 2002
236
IE
Hi all,

I am using VB6 and connecting to a SQL 2000 db using SQL authentication.
I am trying to run a Crystal Report for one of the tables. I have set up the report using the designer and an ODBC source with SQL authentication. The report runs fine from the designer but when I try to open it using the Viewer, it gives the following error...
"The server has not yet been opened"

Dim crystal As CRAXDRT.Application
Dim crRep As CRAXDRT.Report
Dim cParam As CRAXDRT.ParameterFieldDefinition
Dim cParams As CRAXDRT.ParameterFieldDefinitions

ShowWorkTypeReport = False

Set crystal = New CRAXDRT.Application
Set crRep = crystal.OpenReport(g_sWorkTypeReport)
Set cParams = crRep.ParameterFields
For Each cParam In cParams
With cParam
Select Case .ParameterFieldName
Case "WorkType"
.AddCurrentValue sWorkType
Case "StartDate"
.AddCurrentValue dtStartDate
Case "EndDate"
.AddCurrentValue dtEndDate
End Select
End With
Next cParam

crRep.EnableParameterPrompting = False
crvLog.ReportSource = crRep
crvLog.ViewReport

Can anyone tell me why this is happening? I did manage to open the report throught the viewer yesterday a couple of times but not since.

Any help very gratefully received!
Thanks,
Robin
 
Pls ignore as problem is fixed using .logoninfo
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top