I have created Crystal(version 8) report which takes in Parameter value. It prompts users to select one of the months from the list then it matches this month value to the date field and opens the report showing results for that month.
Now I would like to open this report from VB 6.
It opens the form with Crystal Viewer and brings up the prompt that I created in Crystal report. But after that it gives me error of "Server Has not been open Yet"...What am I doing wrong. I have tried every thing possible I can think of. Please help me.
Here is my code..(in VB)
Public Function PrintInhouseCheckRegister() As Boolean
On Error GoTo Err_PrintInhouseCheckRegister
Dim CRApp As New CRAXDRT.Application
Dim crReport As New CRAXDRT.Report
Dim CRViewer As New CRViewer
Dim rsLetter As New ADODB.Recordset
Dim rsdelete As New ADODB.Recordset
Dim strDelete As String
PrintInhouseCheckRegister = False
Set crReport = CRApp.OpenReport(sCheckRegister)
frmCrystalViewer.Caption = "Check Register"
frmCrystalViewer.CRViewer.ReportSource = crReport
frmCreateInhouseCheck.Hide
frmCrystalViewer.Show
frmCrystalViewer.CRViewer.ViewReport
PrintInhouseCheckRegister = True
Exit_PrintInhouseCheckRegister:
Exit Function
Err_PrintInhouseCheckRegister:
MsgBox Error$ & Err
Resume Exit_PrintInhouseCheckRegister
End Function
Now I would like to open this report from VB 6.
It opens the form with Crystal Viewer and brings up the prompt that I created in Crystal report. But after that it gives me error of "Server Has not been open Yet"...What am I doing wrong. I have tried every thing possible I can think of. Please help me.
Here is my code..(in VB)
Public Function PrintInhouseCheckRegister() As Boolean
On Error GoTo Err_PrintInhouseCheckRegister
Dim CRApp As New CRAXDRT.Application
Dim crReport As New CRAXDRT.Report
Dim CRViewer As New CRViewer
Dim rsLetter As New ADODB.Recordset
Dim rsdelete As New ADODB.Recordset
Dim strDelete As String
PrintInhouseCheckRegister = False
Set crReport = CRApp.OpenReport(sCheckRegister)
frmCrystalViewer.Caption = "Check Register"
frmCrystalViewer.CRViewer.ReportSource = crReport
frmCreateInhouseCheck.Hide
frmCrystalViewer.Show
frmCrystalViewer.CRViewer.ViewReport
PrintInhouseCheckRegister = True
Exit_PrintInhouseCheckRegister:
Exit Function
Err_PrintInhouseCheckRegister:
MsgBox Error$ & Err
Resume Exit_PrintInhouseCheckRegister
End Function