none
linq and Reporting RRS feed

  • Question

  • Hello,

     

    I have been using report control to generate reports, I can connect dataset to a report and report from that, fairly straight forward using the wizard, i'm wondering if its possible to generate a report with data return via linq, i.e customer has many orders, I am generating my query using linq and would like the report to have customer and order information

     

    i have something like

     

    var cust = from c in db.customer

    where c.id = 1234

    select new { c.order, c.name, c.addres .... etc}

     

    How would i display the above results in the reportviewer. some code sample would be of great help

     

    regards

     

    S. 

    Friday, May 23, 2008 3:06 PM

All replies

  • Wouldn't know how to do it with the designer, in general I handle all my datasources programatically.  But I'd assume you'd just have to set the value of a ReportDataSource object to the linq object and then give it to the report viewer.  I haven't tested any of this though.

    Friday, May 23, 2008 6:15 PM