I've downloaded the latest (v6.2) trial version of Telerik Reporting but cannot figure out how to hook it up to my Entity Framework model.
I've added an EntityDataSource
to the designer but this requires a typeof(ObjectContext)
which I don't have.
Looking at the example code from the Telerik website it appears I might be able to cast from DbContext to ObjectContext at runtime but this does not (that I can see) enable me to build a report at design time.
Is it possible to get Telerik Reporting to work with Entity Framework 5?
9 Answers, 1 is accepted
The EntityDataSource component is meant to bind only to ObjectContext (so that it is compatible with the old .NET 3.5 version of Entity Framework) and it does not support DbContext directly. In that case you have two options. The first and the better one is to work with the ObjectDataSource because you are already working with POCOs and it will be very easy. The second one is to extract the ObjectContext from the DbContext wrapper. It is not as simple as using a property, but can be valuable if you insist on working with the EntityDataSource. More information you can find in this Accessing ObjectContext Features from EF 4.1 DbContext article.
We would have DbContext support in mind for subsequent version of the product (most probably once we drop support for older versions of the .NET framework).
Kind regards,
Steve
the Telerik team
HAPPY WITH REPORTING? Do you feel that it is fantastic? Or easy to use? Or better than Crystal Reports? Tell the world, and help fellow developers! Write a short review about Telerik Reporting and Telerik Report Designer in Visual Studio Gallery today!
I.e. how do I configure ObjectDataSource to read my POCO data so that the relationships etc all work as expected?
I then stumbled across a video on your website that gave showed me how to bind the report to the source and also showed me the Data Explorer.
I now have a problem that the ICollection references from one POCO to another are not handled in the report.
The reporting solution looks great but I can't find any examples that cover my scenario and the forum is a bit sparse - creating a report shouldn't be this difficult.
Please check the attached sample illustrating the usage of nested collections via objectDataSource component.
I hope this helps.
Kind regards,
Stef
the Telerik team
See what's new in Telerik Reporting Q1 2013. Register for the March 4 webinar to witness the impressive new visualizations in Telerik Reporting. Just for fun, 10 webinar attendees will be randomly selected to win a Telerik T-shirt and a $50 Gift Certificate to ThinkGeek. Register now! Seats are limited!
Can you tell us if there are any plans to integrate DbContext and EF 5 in your reporting component? EF 5 was released in August 2012 and is the Framework to use in the future so it should by supported.
Regards
Neils
As my colleague has mentioned, having DbContext support is in our future plans and until that moment please use the suggested approaches for working with EF. In addition, please check what Telerik OpenAccess ORM can offer to you: 7 Reasons to Choose OpenAccess ORM over Entity Framework
Let us know if you have any other concerns.
Greetings,
Stef
the Telerik team
Telerik Reporting Q1 2013 available for download with impressive new visualizations. Download today from your account.
The EntityDataSource documentation including how to use the DBContext is available with the Telerik Reporting offline documentation available for download from your account Home / Your Products. Additionally we have scheduled update for the online help later this week.
Regards,Peter
Telerik
Have you tried the new visualization options in Telerik Reporting Q2 2013? You can get them from your account.