vb6调用水晶报表不刷新
设置好水晶报表模板,水晶报表是连着access表,access表中的数据每次都会更新,然后vb调用此报表,可是报表每次都不刷新数据,用了 rpt.DiscardSavedData = True提示出错:缺少函数和变量。代码如下:
Private Sub Form_Load()
Dim app As New CRAXDRT.Application
Dim rpt As New CRAXDRT.Report
rpt.DiscardSavedData = True
Set rpt = app.OpenReport("d:\MoneyRpt.rpt", 1)
CRViewer91.ReportSource = rpt
rpt.DiscardSavedData = True
CRViewer91.ViewReport
CRViewer91.Top = 0
CRViewer91.Left = 0
CRViewer91.Height = Me.Height
CRViewer91.Width = Me.Width
End Sub
请教各位,谢谢。