OnlyDanny 0 Newbie Poster

:unsure:
I dont know y this happens...i try a lot of times but....anyways, the problem is that,
the crystal report does not show the actual result when an sql query is being used to extract data, even from a single table...while it runs correcty in MS Access where i have my database....
I am using the same query but, all in vein...
:helpsmilie:

here's the code:

Dim ds As New DataSet
        Dim conn As OleDb.OleDbConnection = New OleDb.OleDbConnection("Provider=microsoft.jet.oledb.4.0 ; data source=C:\pos\pos.mdb")
        Dim da As OleDb.OleDbDataAdapter
        Dim dt As New DataTable

        Dim sql As String = "SELECT * from Sales"
        'Dim sql As String = "SELECT Sum(S_Ttl), S_Date FROM Sales WHERE S_Date Between #5/30/2010# And #6/1/2010# GROUP BY S_Date"
        da = New OleDb.OleDbDataAdapter(sql, conn)
        Try

            da.Fill(ds, "Sales")
        Catch err As Exception
            MessageBox.Show(err.ToString, " Path", MessageBoxButtons.OKCancel, MessageBoxIcon.Error)
        End Try
        dt = ds.Tables("Sales")
        Dim cr As New CrystalReport1
        cr.SetDataSource(ds.Tables(0))
        CrystalReportViewer1.ReportSource = cr