This is a migrated thread and some comments may be shown as answers.

LINQ Datasource

6 Answers 465 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Norsten
Top achievements
Rank 1
Norsten asked on 10 Apr 2008, 01:28 PM

Will Telerik Reporting 2008 Q1 support LINQ datasources?

6 Answers, 1 is accepted

Sort by
0
Svetoslav
Telerik team
answered on 11 Apr 2008, 07:22 AM
Hello Norsten,

Currently Telerik Reporting (incl. Q1 2008) is compiled against .NET 2.0 which restricts its data processing engine from working with the LINQ data sources. To support LINQ we have to move to .NET 3.0/3.5 that I hope we will do soon.

 
Regards,
Svetoslav
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Ian Blackburn
Top achievements
Rank 1
answered on 09 Jul 2008, 11:02 AM

You can of course use Linq to provide data to the report at runtime, just not in the designer.  For example the following is an example that we have used:

        Reports.Courses courseReport = new Reports.Courses();
        MyDataContext db = new MyDataContext();
        var data = from c in db.UserCourses
                   where c.Course.CentreId == int.Parse(DropDownList1.SelectedValue)
                   && c.Course.Start >= RadDateTimePicker1.SelectedDate
                   && c.Course.End <= RadDateTimePicker2.SelectedDate
                   select new { c.Course.Centre.Name, c.Course.Subject, c.Course.Tags, c.Course.Start, c.Course.End, c.User.Username, c.Comment, c.Public, c.CourseId, c.User.Email, c.User.MobileNumber };
        courseReport.DataSource = data;
        ReportViewer1.Report = courseReport;
        ReportViewer1.Visible = true;
0
Steve
Telerik team
answered on 09 Jul 2008, 12:48 PM
Hello Ian,

You are of course correct that you can provide data programmatically, but the main benefit we would get when moving to LINQ, would be the faster filtering, grouping, sorting etc.

Best wishes,
Steve
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Doug Odegaard
Top achievements
Rank 2
answered on 15 Aug 2008, 08:49 PM
any ideas or plan on which release this might come out in?  I know that is a magic question and i won't hold you to it.  TIA....d
0
Doug Odegaard
Top achievements
Rank 2
answered on 15 Aug 2008, 09:10 PM
I can set the Q2 2008 report to a business object and then choose one of my LINQ to SQL class objects with all of the fields and objects showing up.  But upon Preview it crashes Vsiaul Studio 2008.  Would this be an expected behavior at this point?
0
Svetoslav
Telerik team
answered on 18 Aug 2008, 08:44 AM
Hi Doug Odegaard,

Although we plan to switch to .NET 3.0 we haven't set any time frame for it.

A possible reason for VS to crash when previewing a report is because of an exception while instantiating the report for the preview. According to our observations this often is a problem with the data source object that is usually prepared in the report's constructor right after the InitailizeComponent() method call. If this is your case please surround your code in a try-catch block and see what is the actual problem (exception) if any.

Kind regards,
Svetoslav
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
General Discussions
Asked by
Norsten
Top achievements
Rank 1
Answers by
Svetoslav
Telerik team
Ian Blackburn
Top achievements
Rank 1
Steve
Telerik team
Doug Odegaard
Top achievements
Rank 2
Share this question
or