日期:2014-05-20  浏览次数:20776 次

急,VB调用水晶报表 老提示 内存错误
Set m_report = m_application.OpenReport(App.Path & "\mrpreport.rpt", 1)
  m_report.Database.SetDataSource rstprod
  m_report.ReadRecords
    
  frmreport.CRViewer.ReportSource = m_report
  frmreport.CRViewer.Visible = True
  frmreport.CRViewer.Zoom 1
  Screen.MousePointer = vbDefault
  frmreport.CRViewer.ViewReport
  frmreport.Show 1
  Set mainRS = Nothing
  Exit Sub

这样调用 运行的时候rstprod里也有值, 一运行就提示“ 应用程序出错,0x07694842"指令引用的"0x0000004"内存,该内存不能为"read"
要终止程序,请单击"确定"
要调试程序,请单击取消

这是什么问题啊???
------最佳解决方案--------------------
是否報表裡有設定參數欄位,程式碼沒有賦值!
------其他解决方案--------------------
重装系统,有病毒