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

Consuming OData Feeds From Telerik Report

3 Answers 211 Views
Report Designer (standalone)
This is a migrated thread and some comments may be shown as answers.
Sudarshan
Top achievements
Rank 1
Sudarshan asked on 16 Mar 2016, 05:23 AM
Hi , I built a wcf data service (http://localhost:4008/WcfDataService1.svc/) and connecting with Telerik reporting , i am not getting how to do it , i am novice in web services. The blog link (http://www.telerik.com/blogs/connecting-telerik-reporting-to-odata-feeds) is not of much help for me , video given in that page doesn't work either.Will be greatly thankful if someone helps.

3 Answers, 1 is accepted

Sort by
0
Stef
Telerik team
answered on 18 Mar 2016, 01:40 PM
Hello Sudarshan,

The Connecting Telerik Reporting to OData feeds blog post illustrates how to consume data service as a data source in reports.
The idea is to create a method and to consume the result from your existing data service in a data object like DataTable, custom class etc. The data object then can be returned by the method and used by the report.

Example for creating and consuming WCF data services are available in Creating the Data Service (msdn) and Creating the .NET Framework Client Application (WCF Data Services Quickstart). Note that these msdn articles are related to WCF data services, and you can use any other approach to deliver and consume data in a .NET application.
For reports it is important to have the data loaded in a .NET object.


I hope this information is helpful.

Regards,
Stef
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Sudarshan
Top achievements
Rank 1
answered on 19 Mar 2016, 09:54 AM

Hi i have already went those steps ,

1 . In empty web application project i added one ADO.Net Entity Data Model

2. Added WCF Data Service 5.6 template to and when i run it it returns the collections ( entities those are in EDM ) and all the data of the collections.(http://localhost:4008/WcfDataService1.svc , http://localhost:4008/WcfDataService1.svc/tblBooks are the urls to get those result.

3. Now I use added one different web Application project  and included the service reference and then i added a class and a method that gives me the data of tblBooks.

4. Now I tried to add a telerik report wizard and tried with Object Data Source , in that i choose my method of the class who return alll the data as a data source , then one next dialog box show fields to be choose and there is no field so not able to move forward only .

the link about Odata feed you sent i went a number of time not able to get that.

0
Stef
Telerik team
answered on 23 Mar 2016, 04:03 PM
Hello Sudarshan,

Please check the attached demo project that illustrates the scenario from the  Connecting Telerik Reporting to OData feeds blog post.

In general, the business objects and their properties' modifiers must allow external code to access them. A valid model that will show its properties in the Data Explorer is:
public class MyDbContext : DbContext //public class
    {
        static MyDbContext()
        {
          //  Database.SetInitializer<MyDbContext>(new MyDbContextSeedInitializer());
        }
 
        public MyDbContext() : base("Name=MyDbContext") { }
 
        public MyDbContext(string conn) : base(conn) { }
 
        public DbSet<Contact> Contacts{ get; set; }//public property
 
    }
public class Contact
 {
     public string Name { get; set; }
     public List<Phone> Phones { get; set; }      
 }
  
public class Phone
 {
     public string Number { get; set; }
 }


If you need further help, please open a support ticket and send us a demo project that illustrates the data model and service settings, and how data is consumed in the data-retrieval method.

Regards,
Stef
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Report Designer (standalone)
Asked by
Sudarshan
Top achievements
Rank 1
Answers by
Stef
Telerik team
Sudarshan
Top achievements
Rank 1
Share this question
or