code_junkie

Crystal Reports and LINQ

Nov 11th, 2011
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. CrystalReport1 cr1 = new CrystalReport1();
  2.  
  3. var results = (from obj in context.tSamples
  4. where obj.ID == 112
  5. select new { obj.Name, obj.Model, obj.Producer }).ToList();
  6.  
  7. cr1.SetDataSource(results);
  8. crystalReportsViewer1.ReportSource = cr1;
Add Comment
Please, Sign In to add comment