Dim capp As New CRAXDRT.Application Dim carp As New CRAXDRT.Report Set carp = capp.OpenReport(App.Path & "\rpt\" & ReportName & ".rpt") carp.Database.SetDataSource rs frmReport.CRViewer91.ReportSource = carp frmReport.CRViewer91.ViewReport frmReport.Show 1
啊抱歉 上面个程序段不完整 Dim rs As New ADODB.Recordset rs.Open "select * from report order by id ", conn, 3, 1 Dim capp As New CRAXDRT.Application Dim carp As New CRAXDRT.Report Set carp = capp.OpenReport(App.Path & "\rpt\私营经济情况统计表.rpt") carp.Database.SetDataSource rs carp.reportTitle = frmCorpSearZH.strExp CRViewer91.ReportSource = carp CRViewer91.ViewReport
Dim carp As New CRAXDRT.Report
Set carp = capp.OpenReport(App.Path & "\rpt\" & ReportName & ".rpt")
carp.Database.SetDataSource rs
frmReport.CRViewer91.ReportSource = carp
frmReport.CRViewer91.ViewReport
frmReport.Show 1
Dim rs As New ADODB.Recordset
rs.Open "select * from report order by id ", conn, 3, 1
Dim capp As New CRAXDRT.Application
Dim carp As New CRAXDRT.Report
Set carp = capp.OpenReport(App.Path & "\rpt\私营经济情况统计表.rpt")
carp.Database.SetDataSource rs
carp.reportTitle = frmCorpSearZH.strExp
CRViewer91.ReportSource = carp
CRViewer91.ViewReport