I need to dynamically specify the data source for SSRS reports at runtime. I found these solutions:
Change SSRS data source of report programmatically in server side
Here is how I change a data source at runtime.
Create another "dsDynamic" data source and set its connection string expression to the following: ="Data Source="+Parameters!DatabaseServer.Value+";Initial Catalog=" + Parameters!DatabaseName.Value
Build and test the report by setting all datasets to the test connection created in step 3.