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

Refresh Crystal RDC from VB6

Status
Not open for further replies.

Maii

Programmer
Aug 28, 2003
54
BD
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

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top