Hello,

I'm writing a VB application and I want to create a report using Crystal Reports 9. I want to base it on a dataset that I populate programatically. When I view the report, no records show up, and there are records in the underlying table. Here is the code:



Dim con As New OleDbConnection
Dim cmd As New OleDbCommand
Dim da As New OleDbDataAdapter
Dim cb As OleDbCommandBuilder
Dim ds As New NamesNumbersDataSet 'NamesNumbersDataSet was generated when I added the dB
Dim rpt As New CrystalReport1


con.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Users\Ralph\Documents\Visual Studio 2010\Projects\Crystal Reports using OLEdB\Crystal Reports using OLEdB\Crystal Reports using OLEdB\NamesNumbers.mdb"
con.Open()
cmd.Connection = con
cmd.CommandText = "select First, Last from tblNames"
da.SelectCommand = cmd
cb = New OleDbCommandBuilder(da)
da.Fill(ds)
rpt.SetDataSource(ds)
CrystalReportViewer1.ReportSource = rpt
CrystalReportViewer1.RefreshReport()
CrystalReportViewer1.Show()
con.Close()

Why are there no records showing up on the report? It is based on NamesNumbersDataSet.xsd


Thanks,

Ralph1965