I have a slightly different scenario, but still along the same lines as this.
Our reports use WebServiceDataSource with the Service URL defined as @Url and at run-time this value set using the DataSource parameter passed into the report form our web page. (i.e. = Parameters.DataSource.Value). This all works fine. The DataSource value would be:
Our reports also include parameters, one of which is a list of customer sites. So I created another WebServiceDataSourcecalled dsSitesParam and set the Service URL to @Url1. The API would be similar to the DataSource value except the 'Security' text would be replaced with 'Sites', so at run-time we are using the same DataSource paramater but using the Replace function to change the 'Security' to 'Site'. (i.e. = Replace(Parameters.DataSource.Value,"Security","Sites")
At design time when using the hard-coded path to the Sites api and can download the site just fine. See screenshot dsSitesParam.
The reports also have a Sites parameter. When using a CSV Data Source for this parameter, it works fine. When I set it to use the dsSitesParam data source, the report fails to load with the following error:
Invalid URI: Hostname could not be parsed
Should I be able to use the Replace function of the DataSource value to change it to the correct API to be used for getting the list of sites?