Search code examples
telerik-reporting

In telerik reporting, how to set web service datasource url from appsettings.json?


I am using .net core 3.1 rest api and I want to set telerik report web service data source url from appsettings.json

Is it possible? I have searched many of their official documents but their document is not clear enough to understand. Thank you.


Solution

  • The solution is tricky. In the data source url, use the variable like @variableName In next wizard, You will see @variableName will be showing in the request parameters tab. Put the value there, it will work. Though it is not a very user friendly approach from telerik, because the tab says it's for request parameters only, I would recommend telerik to re design this tab and make it more user friendly. Putting non http request variables inside request parameter tab is very confusing and non standard practice.

    enter image description here enter image description here

    Along with that, you can have more control, during the runtime, you can set the parameter from your c# code and in this way you will be able to pass your values from runtime