|
i will be new to crytal report xi
The following code is programmed and converted into EXE and running in the client system. i am getting error activex Object can't create object 429
Code
Option Explicit Dim cApp As New CRAXDRT.Application Dim rptReport As New CRAXDRT.Report Private Sub Form_Load() Dim sReportName As String On Error GoTo errhandler Set cApp = CreateObject("CrystalRuntime.Application.11") Set cApp = New CRAXDRT.Application Set rptReport = New CRAXDRT.Report sReportName = App.Path & "\report1.rpt" PopulateReport sReportName errhandler: MsgBox Err.Description
End Sub Private Sub Form_Resize() CRViewer1.Top = 0 CRViewer1.Left = 0 CRViewer1.Height = ScaleHeight CRViewer1.Width = ScaleWidth End Sub Private Sub PopulateReport(sReportName As String) Screen.MousePointer = vbHourglass 'App.LogOnServer "crdb_oracle.dll", gstrDatabaseName, "", gstrUserName, gstrPassword Set rptReport = cApp.OpenReport(sReportName) rptReport.Database.LogOnServer "crdb_odbc.dll", "SQL", "TESTDB", "SA", "SA" 'CRViewer1.Refresh CRViewer1.ReportSource = rptReport CRViewer1.ViewReport Screen.MousePointer = vbDefault Set cApp = Nothing Set rptReport = Nothing
Exit Sub End Sub
Any ideas are greatly appreciated.
|