Skip to Content
0
Former Member
Mar 09, 2009 at 08:10 PM

Visual Basic 6.0 and CR XI report viewer

75 Views

When running a VB6.0 applications sometimes a runtime error message stop the app.

What is causing this?

Detail Info

Error Message

Basic syntax is not supported on recordformula

Liine code where error occurs

crwRpt.RecordSelectionFormula = SelectionFormula

Code from Report Form

Private crwApp As New CRAXDRT.Application

Private crwRpt As CRAXDRT.Report

Private Sub Form_Load()

Me.WindowState = vbMaximized

Screen.MousePointer = vbHourglass

Set crwRpt = crwApp.OpenReport(wrkPathCrystal & wrkCrystalRptName) 'Format(Rpt, "000.rpt"))

If SelectionFormula <> "" Then crwRpt.RecordSelectionFormula = SelectionFormula

crwRpt.EnableParameterPrompting = wrkCheckParameters

'crwRpt.PrinterSetup hwnd 'Select Printer

crwRpt.Database.Tables(1).ConnectionProperties("password") = "tme001"

CrystalActiveXReportViewer1.ReportSource = crwRpt

CrystalActiveXReportViewer1.ViewReport

'CrystalActiveXReportViewer1.PrintReport

Screen.MousePointer = vbDefault

End Sub