水晶报表8.5的时候知道的,可是变成9.0了就找不到了
知情者帮忙阿!万分感谢

解决方案 »

  1.   

    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
      

  2.   

    啊抱歉 上面个程序段不完整
        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