Dynamically consuming web services

5 posts, 0 answers
  1. Clinton Smyth
    Clinton Smyth avatar
    65 posts
    Member since:
    Apr 2007

    Posted 09 Oct 2013 Link to this post


    We need to source data from a web service for both designing and running reports in the standalone Telerik Report Designer.

    We have the web service written and published which exposes all the available methods and their parameters to the user.  When called from the web browser it works fine, returning the requested data in a DataTable in XML format (it is a standard .NET web service).

    What we need is for the Report Designer to act in a similar way to the web browser, in that it should dynamically display the web service methods that are available - along with their parameters, and once filled in by the user, they should be invoked and the data made available.  This is needed when designing the report, and should be transparent when running the report.

    Given that our end users are not programmers, the selection of the above needs to be simple.

    We are often updating the web service and thus need the Report Designer to pick changes up dynamically without the need to distribute anything to the client.

    I have created a custom reports datasource (inherits from ObjectDataSource), with config set up and referenced as follows in the Telerik.ReportDesigner.exe.config (per http://www.telerik.com/help/reporting/standalone-report-designer-extending-configuration.html)
                <add name="CustomReportsDataSource" version="" culture="neutral" publicKeyToken="null" />

    The above assembly is only a stub but references the webservice, which I take it allows access to the webservice in the Report Designer due to the Report Designer's use of reflection.

    I was hopeful the following config would enable direct access to the webservice, but it is used only by the CustomReportsDataSource.  This unfortunately means our webservices are not dynamic and have to be stubbed in statically in the CustomReportsDataSource.dll, thus necessitating the distribution of this dll whenever there's a change to the web service.
                <binding name="ReportsWebServiceSoap" />
            <endpoint address="http://localhost:82/Webservices/ReportsWebService.asmx"
                binding="basicHttpBinding" bindingConfiguration="ReportsWebServiceSoap"
                contract="ReportsServiceReference.ReportsWebServiceSoap" name="ReportsWebServiceSoap" />

    To create a report in the Report Designer, I have to do the following (which is also required of a non developer):
    1. Click 'New Report'
    2. Use the Report Designer Wizard and select the Object Data Source.
    3. Click 'Add New Data Source'
    4. Select the 2nd available data source type (appended with 'ReportsServiceReference')
    5. Select 'ReportsWebServiceSoapClient'
    6. Click 'Next' and select 'Choose a data source member'
    7. Select the method required, click 'Next'
    8. Enter the parameters
    9. Select the fields, report type, etc.

    Is there a way to simplify this for the end user?  i.e. include our object data source in 'Current Data Sources' and suppress all extraneous methods, displaying only those from the web service?  Ideally, the end user should not have to deal with steps 3-6 above.

    Initially, I had an error in the config and at this point would always get the following (very vague and thus difficult and hugely time wasting to resolve) message:

    "An error occurred while invoking data retrieval method"

    There were no details pertaining to this message in the Telerik.ReportDesigner.log file (log enabled by adding the system.diagnostics section in the config file, per http://www.telerik.com/community/forums/reporting/telerik-report-designer/standalone-report-designer-exe-requirements.aspx).  Further, the webservice was not being called as evidenced by debugging messages not appearing in the server log.

    It would've saved me hours and would be appreciated if you could provide more details for this type of error (simply displaying the exception generated would've made the world of difference!).

    So my questions are:
    1. As above, is there any way to simplify the report creation process for the end user?
    2. Is there a way to invoke the webservice dynamically?
    3. There was talk of providing an OData data source, any progress/timeframe on that?


  2. Stef
    Stef avatar
    3036 posts

    Posted 15 Oct 2013 Link to this post

    Hello Clinton,

    Connecting to oData feeds is still in our Roadmap. For now the way to use oData is as consuming data service by using external assembly where you can retrieve the data and load it in a custom object for use in the report. For more details take a look at:

    In order to avoid multiple calls to the service, you can load the data in in-memory objects and allow the end-user to work with them in the report. You can also provide templates to help your users.

    About the error you receive, if the Standalone Designer error log does not contain the stack trace, you can test using the same data retrieval method in Visual Studio. If it is a design time issue debug with a second VS instance.

    In order to further troubleshoot the described connectivity issues we will need more details about the exception and an example we can test at our side, so please open a support ticket and send us your files there.


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

  3. DevCraft banner
  4. Clinton Smyth
    Clinton Smyth avatar
    65 posts
    Member since:
    Apr 2007

    Posted 14 Oct 2015 in reply to Stef Link to this post


    It's been a while since our original request and the requirement has resurfaced. Has any progress been made during the intervening time that would make this possible?

    In short, we're looking for a way to dynamically supply a list of classes and their properties to the standalone report designer. We're able to access a static class provided by a separate dll but a dynamic class (provided in the same dll) is not visible.



  5. Stef
    Stef avatar
    3036 posts

    Posted 16 Oct 2015 Link to this post

    Hello Clinton,

    Th approach for using data services as data source in reports is still to have a data access layer wrapped by an Object/Entity/OpenAccess DataSource component. Also data must have a tabular representation and if the data schema will be dynamic, the data source component will have to be reconfigured in order fields to be loaded for usage.

    Feel free to log a feature request describing the business case and the need of a data source component working with data services directly. Features are considered for implementation based on the demand for them and thus you can raise the task's priority.

    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
  6. Clinton Smyth
    Clinton Smyth avatar
    65 posts
    Member since:
    Apr 2007

    Posted 17 Oct 2015 in reply to Stef Link to this post

    I've logged a feature request: http://feedback.telerik.com/Project/162/Feedback/Details/172592-ability-for-standalone-reports-to-use-dynamically-generated-schema
Back to Top
DevCraft banner