Datasource microsoft web api

15 posts, 0 answers
  1. Sebastien AUROUX
    Sebastien AUROUX avatar
    34 posts
    Member since:
    Sep 2008

    Posted 20 Nov 2012 Link to this post

    hello

    is it possible to have the telerik reporting standalone designer connected to a web api ?
    thanks
    sebastien
  2. Steve
    Admin
    Steve avatar
    10941 posts

    Posted 22 Nov 2012 Link to this post

    Hello Sebastien,

    The short answer is no. The standalone designer is not a web control and cannot be used with a framework that is tightly coupled with ASP.NET.

    Kind regards,
    Steve
    the Telerik team

    HAPPY WITH TELERIK 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!

  3. DevCraft banner
  4. suji
    suji avatar
    2 posts
    Member since:
    Nov 2010

    Posted 02 Aug 2013 Link to this post

    Hi,

    is there any feature in telerik for this requirement

    1) Need to develop reports for Cloud environment  using Sql server DB and as well as for Web api [Htttp Based]

    looking for common framework which can be used for both. I am using asp.net MVC , VS 2012  , sql server  and windows azure environment.



    Please provide links for same if any thing available in telerik products.

    Thanks,


  5. Peter
    Admin
    Peter avatar
    1611 posts

    Posted 06 Aug 2013 Link to this post

    Hi,

    Generally you can use for the DB datasource our SqlDataSource component. About the Web API you can utilize it as datasource if you create a data layer that retrieves the Web API data and returns an IEnumerable. Then you can databind the data items with the ObjectDataSource.

    Up the report viewer currently we work on native MVC/HTML5 report viewer and the first betas will be available prior the Q3 official release. In the meantime you can use the Web report viewer as elaborated in the Telerik Reporting in MVC? Sure. It takes 8 quick steps help article.

    Regards,
    Peter
    Telerik

    Have you tried the new visualization options in Telerik Reporting Q2 2013? You can get them from your account.

  6. Ankur
    Ankur avatar
    2 posts
    Member since:
    Jul 2013

    Posted 16 Sep 2013 Link to this post

    Hi, can you please tell me how to use the web api with the telerik reporiting?
    I mean, can you please give an example on how to utilize the data from the web api into the telerik reporting?

    The things that are to be included should be:
    Entity framework (Not open access or open access service), Telerik Reporting, C#, ASP.NET Web API.


    Thanks
  7. Stef
    Admin
    Stef avatar
    3036 posts

    Posted 18 Sep 2013 Link to this post

    Hi Ankur,

    As my colleague stated, create a separate data layer using Entity Framework. The same data can be used for both your application and report definitions. For more details, please take a look at the following articles:

    I hope this helps.

    Regards,
    Stef
    Telerik

    Have you tried the new visualization options in Telerik Reporting Q2 2013? You can get them from your account.

  8. Hayfa
    Hayfa avatar
    9 posts
    Member since:
    Sep 2015

    Posted 01 Feb in reply to Steve Link to this post

    i want to consume our ".NET web api odata", as it has all the data i need when designing my reports. Do you have any good examples of doing that ?
  9. Stef
    Admin
    Stef avatar
    3036 posts

    Posted 01 Feb Link to this post

    Hi Hayfa,

    The Connecting Telerik Reporting to OData feeds blog article illustrates how data service's response can be consumed and used as data source in a report. The approach is the same with oData v4 - once data is retrieved and read in a business object, it can be used in reports.

    If you are using the Standalone Report Designer, the data access layer must be built in an external assembly that extends the designer - Extending Report Designer.


    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
  10. Hayfa
    Hayfa avatar
    9 posts
    Member since:
    Sep 2015

    Posted 01 Feb in reply to Stef Link to this post

    Hi stef,

    this blog article illustrates  "Connecting Telerik Reporting to OData feeds" with WCF not web api , Do you have an example with odata v4 web api not WCF web service?

  11. Stef
    Admin
    Stef avatar
    3036 posts

    Posted 01 Feb Link to this post

    Hello Hayfa,

    The approach is the same.

    You will need a data access layer e.g. a class with a method in which you can create a client of the existing data service and read data into custom business objects. The received and loaded data can be returned from the method. For more details, please check asp.net WebAPI tutorials - Create an OData v4 Client App.

    Once data is available it can be used in reports as in the  Connecting Telerik Reporting to OData feeds blog article - the method in which data is retrieved is wrapped by a Reporting ObjectDataSource component which is used in a report.

    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
  12. Hayfa
    Hayfa avatar
    9 posts
    Member since:
    Sep 2015

    Posted 02 Feb in reply to Stef Link to this post

    I created an odata client like this tutorial : "Create an OData v4 Client App".

    but " Connecting Telerik Reporting to OData feeds" tutorial dont't help me

    i created this function :

    internal static IEnumerable<EzCentral.Models.Erp.Client> ListAllClients(Default.Container container)
            {
                return container.Clients.ToArray();
             
            } 

    but in report viewer in "Edit expression" i dont't find this method.

    i used the external assemblies with custom user functions in the Report Designer :

    http://www.telerik.com/support/kb/reporting/details/how-to-use-external-assemblies-with-custom-user-functions-in-the-report-designer

    so my problem is binding my function with objectDatasource. usually the object data source was empty 

     

  13. Stef
    Admin
    Stef avatar
    3036 posts

    Posted 04 Feb Link to this post

    Hello Hayfa,

    Please double-check the access modifiers of the methods and if they allow reports to use them.

    When you configure an ObjectDataSource component, the ObjectDataSource wizard will load all public types, their public methods and properties. For more details check ObjectDataSource Wizard - step 2: Choose a data member.

    You may be interested also in How to Databind to Collection Properties and Use DataObject as a datasource for nested data items (Table, List, Crosstab, Graph). This approach will allow you to use the collection properties for nested data items' DataSource properties.

    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
  14. Hayfa
    Hayfa avatar
    9 posts
    Member since:
    Sep 2015

    Posted 18 Feb in reply to Stef Link to this post

    Dear Stef
    in report viewer in "Edit expression" i dont't find my public method.

    public List<ReportTest.Models.Product> GetProducts(decimal price)
            {
                var  serviceUri = "http://localhost:24584/";
                var container = new Default.Container(new Uri(serviceUri));
                return container.Products.Where(product => product.Price == price).ToList(); 
               
            }



  15. Hayfa
    Hayfa avatar
    9 posts
    Member since:
    Sep 2015

    Posted 18 Feb in reply to Hayfa Link to this post

    But if my public function returns a string, i find it in "Edit expression" ,

    what's the problem with function who returned list of objects?

  16. Stef
    Admin
    Stef avatar
    3036 posts

    Posted 19 Feb Link to this post

    Hello Hayfa,

    If there is an assembly having a public class with public function like the illustrated GetProducts, the public class and its method will be listed in the first step of the ObjectDataSource Wizard.

    In the 'Edit expression' dialog under Misc, you will be able to see user functions (public static methods of public types) existing in the loaded assembly.

    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
DevCraft banner