Dim oRpt As New Rpt1 '报表
        Dim DS As New DataSet
        Dim strSQL As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source =" & Application.StartupPath & "\MSDB.mdb"
        Dim Conn As New OleDb.OleDbConnection(strSQL)
        Conn.Open()
        Dim daPro As New OleDb.OleDbDataAdapter("select * from tblProduct where PAct = '出库'", Conn) '对报表记录过滤

        daPro.Fill(DS, "tblProduct")
        Try
            oRpt.SetDataSource(DS.Tables("tblProduct"))  '刚没指明表
        Catch ex As Exception
            MsgBox(ex.Message)
        End Try
        Crv.ReportSource = oRpt

posted on 2005-03-25 17:36  Ecoboy  阅读(308)  评论(0)    收藏  举报