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

How to get and modify report Web Service DataSources programmatically?

1 Answer 724 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Tursunkhuja
Top achievements
Rank 2
Iron
Iron
Veteran
Tursunkhuja asked on 02 Oct 2020, 09:41 AM

Is there any way of getting and editing web service datasource from report file(*.trdx, *.trdp) programmatically without using standalone Report Designer tool?

I know Report has DataSources property, but it's private. My scenario is: I generate OData query at runtime and I have to set that OData query string to the report WebServiceDataSource.ServiceUrl property value, or I have to change existed OData query and save that to data source. 

In this post suggested getting data sources through the data items(Table, List, Report parameters,...). But, for example I created data source and it's not assigned to any items yet. In this case how can I access to that data source? I still want to modify that data source which is not assigned.

Thanks,

 

1 Answer, 1 is accepted

Sort by
0
Todor
Telerik team
answered on 07 Oct 2020, 09:02 AM

Hello Tursunhuja,

Currently, the DataSources are not directly accessible. Here are two feature requests that require the same and you may want to vote for:

The workaround is to use a Report Parameter and pass the serviceUrl runtime - Using Parameters with the WebServiceDataSource component (Using Inline Parameters in Service Url).

Regards,
Todor
Progress Telerik

Five days of Blazor, Angular, React, and Xamarin experts live-coding on twitch.tv/CodeItLive, special prizes, and more, for FREE?! Register now for DevReach 2.0(20).

Tags
General Discussions
Asked by
Tursunkhuja
Top achievements
Rank 2
Iron
Iron
Veteran
Answers by
Todor
Telerik team
Share this question
or