Consuming OData Feeds From Telerik Report

4 posts, 0 answers
  1. Sudarshan
    Sudarshan avatar
    11 posts
    Member since:
    Feb 2016

    Posted 16 Mar Link to this post

    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.
  2. Stef
    Admin
    Stef avatar
    3044 posts

    Posted 18 Mar Link to this post

    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
  3. DevCraft banner
  4. Sudarshan
    Sudarshan avatar
    11 posts
    Member since:
    Feb 2016

    Posted 19 Mar in reply to Stef Link to this post

    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.

  5. Stef
    Admin
    Stef avatar
    3044 posts

    Posted 23 Mar Link to this post

    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
Back to Top