I am trying to create a dynamic Crystal Report in ASP.NET. I know my SQL works and my database connection is correct, but when I display the page, the table is empty. All of the columns are displayed, but there is no data.
I have a DataSet file named DataSet1736.xsd with the XML representation of the query.
I have a Crystal Report file names CrystalReport1736.rpt which refers to DataSet1736.xsd.
In my aspx (c#) page I have the follwing code to create my dataset:
=============
OleDbDataAdapter myCommand = new OleDbDataAdapter(sql, dbConnection);
DataSet1736 ds = new DataSet1736();
CrystalReport1736 cr = new CrystalReport1736();
myCommand.Fill(ds);
cr.SetDataSource(ds);
CrystalReportViewer1.ReportSource = cr;
===========
"sql" is my sql select command.
"dbConnection" is my database connection.
Everything that I have read says that this should work, but I don't know why my table is empty.
If I do:
Response.Write(ds.GetXml());
I get a list of all the values that were selected (so I know the dataset is not empty).
Any help is greatly appreciated.
Thanks,
Steve
I have a DataSet file named DataSet1736.xsd with the XML representation of the query.
I have a Crystal Report file names CrystalReport1736.rpt which refers to DataSet1736.xsd.
In my aspx (c#) page I have the follwing code to create my dataset:
=============
OleDbDataAdapter myCommand = new OleDbDataAdapter(sql, dbConnection);
DataSet1736 ds = new DataSet1736();
CrystalReport1736 cr = new CrystalReport1736();
myCommand.Fill(ds);
cr.SetDataSource(ds);
CrystalReportViewer1.ReportSource = cr;
===========
"sql" is my sql select command.
"dbConnection" is my database connection.
Everything that I have read says that this should work, but I don't know why my table is empty.
If I do:
Response.Write(ds.GetXml());
I get a list of all the values that were selected (so I know the dataset is not empty).
Any help is greatly appreciated.
Thanks,
Steve