A
Aussie Rules
Hi,
I have a crystal report that I designed against a SQL server databas. I am
now using sqlexpress so have to use a dataset as the source of the reports
data as in sql express i am attaching the database at run time.
So I have followed the guides, and have a dataset added to my vb.net2008
solution. When I go into the dataset designer I can preview the data no
problem (its a basic select sql statment with no params)
I have then added the fields to my report, but when I run the report I get
the column headins, but no data displayed?
What have I missed her?
Dim report As New test 'basic report
Dim Adapter As SqlDataAdapter = New SqlDataAdapter("select * from
rpt_compare", dbConnection) 'Passing the query in the connection
Dim DataSet As DataSet = New DataSet() 'DataSet
Adapter.Fill(DataSet)
Dim DataTable As DataTable = New DataTable 'DataTable
DataTable = DataSet.Tables(0) 'filling the datatable here
Report.SetDataSource(DataTable)
CrystalReportViewer1.ReportSource = Report
I have a crystal report that I designed against a SQL server databas. I am
now using sqlexpress so have to use a dataset as the source of the reports
data as in sql express i am attaching the database at run time.
So I have followed the guides, and have a dataset added to my vb.net2008
solution. When I go into the dataset designer I can preview the data no
problem (its a basic select sql statment with no params)
I have then added the fields to my report, but when I run the report I get
the column headins, but no data displayed?
What have I missed her?
Dim report As New test 'basic report
Dim Adapter As SqlDataAdapter = New SqlDataAdapter("select * from
rpt_compare", dbConnection) 'Passing the query in the connection
Dim DataSet As DataSet = New DataSet() 'DataSet
Adapter.Fill(DataSet)
Dim DataTable As DataTable = New DataTable 'DataTable
DataTable = DataSet.Tables(0) 'filling the datatable here
Report.SetDataSource(DataTable)
CrystalReportViewer1.ReportSource = Report