Hi,
I have tried to refresh a report using Crystal RDC but an error occured that
"Server has not yet been opened"
Listed below is the code that I am using.
Private crxApplication As New CRAXDRT.Application
Private mREPORT As CRAXDRT.Report
Private db As CRAXDRT.Database
Private Sub Form_Load()
Dim strSQL As String
Dim rsGet As New ADODB.Recordset
Dim strReport As String
strSQL = "SELECT * FROM TABLE1"
rsGet.Open strSQL, conn, adOpenKeyset, adLockReadOnly
strReport = App.Path & "\Report1.rpt"
Set mREPORT = crxApplication.OpenReport(strReport)
mREPORT.DiscardSavedData
mREPORT.Database.SetDataSource rsGet
CRViewer1.ReportSource = mREPORT
CRViewer1.ViewReport
End Sub
any suggestion will be appriciate
thanks
Maii
I have tried to refresh a report using Crystal RDC but an error occured that
"Server has not yet been opened"
Listed below is the code that I am using.
Private crxApplication As New CRAXDRT.Application
Private mREPORT As CRAXDRT.Report
Private db As CRAXDRT.Database
Private Sub Form_Load()
Dim strSQL As String
Dim rsGet As New ADODB.Recordset
Dim strReport As String
strSQL = "SELECT * FROM TABLE1"
rsGet.Open strSQL, conn, adOpenKeyset, adLockReadOnly
strReport = App.Path & "\Report1.rpt"
Set mREPORT = crxApplication.OpenReport(strReport)
mREPORT.DiscardSavedData
mREPORT.Database.SetDataSource rsGet
CRViewer1.ReportSource = mREPORT
CRViewer1.ViewReport
End Sub
any suggestion will be appriciate
thanks
Maii