I am new to crystal reports and would like to to display sql data on a crystal report using linq2sql. So far i am just trying to display one field (tripNo) with no luck. My error is the data source object is invalid. Here is my code.
private void runstuff()
{
using (DataClasses1DataContext db = new DataClasses1DataContext())
{
var test = (from s in db.trips
select s.tripNo).First();
CrystalReport1 cr1 = new CrystalReport1();
cr1.SetDataSource(test);
crystalReportViewer1.ReportSource = cr1;
}
}