K
Karine Proot
Hello,
I created two reports :
- OleDbReport.rpt, with an OLE DB (ADO) data source (took only table
'stores' from database 'pubs')
- DataSetReport.rpt, with an ADO.NET DataSet as a data source (this dataset
contains only tables 'stores' as in 'pubs' database)
I created a winform, with a CrystalReportViewer in it.
I tried to show the two reports in it.
- OleDbReport works great :
OleDbReport report = new OleDbReport ();
crystalReportViewer1.ReportSource = report;
- DataSetReport doesn't :
DataSetReport report = new DataSetReport ();
SqlConnection connection = new SqlConnection (myConnectionString); //
containing Database=pubs;
SqlDataAdapter adapter = new SqlDataAdapter ();
adapter.SelectCommand = new SqlCommand ("SELECT * FROM STORES", connection);
connection.Open ();
DataSet dataset = new DataSet ();
adapter.Fill (dataset);
connection.Close ();
report.SetDataSource (dataset);
crystalReportViewer1.ReportSource = report; // it seems to go wrong here
I get the following error (translated from french, so maybe not exactly that
one) :
Search engine error:
'C:\DOCUME~1\KARINE~1.DEV\LOCALS~1\Temp\temp_[...].rpt'
Karine
I created two reports :
- OleDbReport.rpt, with an OLE DB (ADO) data source (took only table
'stores' from database 'pubs')
- DataSetReport.rpt, with an ADO.NET DataSet as a data source (this dataset
contains only tables 'stores' as in 'pubs' database)
I created a winform, with a CrystalReportViewer in it.
I tried to show the two reports in it.
- OleDbReport works great :
OleDbReport report = new OleDbReport ();
crystalReportViewer1.ReportSource = report;
- DataSetReport doesn't :
DataSetReport report = new DataSetReport ();
SqlConnection connection = new SqlConnection (myConnectionString); //
containing Database=pubs;
SqlDataAdapter adapter = new SqlDataAdapter ();
adapter.SelectCommand = new SqlCommand ("SELECT * FROM STORES", connection);
connection.Open ();
DataSet dataset = new DataSet ();
adapter.Fill (dataset);
connection.Close ();
report.SetDataSource (dataset);
crystalReportViewer1.ReportSource = report; // it seems to go wrong here
I get the following error (translated from french, so maybe not exactly that
one) :
Search engine error:
'C:\DOCUME~1\KARINE~1.DEV\LOCALS~1\Temp\temp_[...].rpt'
Karine