自立更生,搞定了,我的代码如下
Dim cnn As New ADODB.Connection
Dim rst As New ADODB.Recordset Set CrReport = Appl.OpenReport(App.Path & "\rpt_FB0020.rpt") 'Open the Events.rpt report file.
With cnn
.Provider = "Microsoft.Jet.OLEDB.4.0"
.Open "D:\work\医師\source\wmdb\KAIINMDB.mdb"
End With
Call rst.Open("FB0020", cnn, adOpenDynamic, adLockReadOnly, adCmdTable)
CrReport.ParameterFields(1).AddCurrentValue "abd"
CrReport.Database.SetDataSource rst
CRViewer91.ReportSource = CrReport 'Sets the Report source of the CrViewer to the Report object we created.
CRViewer91.ViewReport 'View the Report.
Dim cnn As New ADODB.Connection
Dim rst As New ADODB.Recordset Set CrReport = Appl.OpenReport(App.Path & "\rpt_FB0020.rpt") 'Open the Events.rpt report file.
With cnn
.Provider = "Microsoft.Jet.OLEDB.4.0"
.Open "D:\work\医師\source\wmdb\KAIINMDB.mdb"
End With
Call rst.Open("FB0020", cnn, adOpenDynamic, adLockReadOnly, adCmdTable)
CrReport.ParameterFields(1).AddCurrentValue "abd"
CrReport.Database.SetDataSource rst
CRViewer91.ReportSource = CrReport 'Sets the Report source of the CrViewer to the Report object we created.
CRViewer91.ViewReport 'View the Report.
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货