There are some ideas out there which I couldn't get to work properly and they wouldn't work in the report deigner anyway so were a clunky to work with.
What I've come up with is a procedure to build a report and, either add the filters at the end so that design is much quicker (I hate having to type usernames and password every time a test a flippin' report), or will work from within the designer as you wish.
I start off with a regular shared DataSource and a report that's pretty much complete;
- Add a single string Parameter called DatabaseName
- In the data designer, click the properties button to the right of the current Data Source
- In the window that opens, click on the properties button to the right of the current Data Source
- Untick Use shared data source reference
- Type the following as the Connection String:
="Data Source=RCOPEH2K3VS;Initial Catalog=" & Parameters!DatabaseName.Value - Click on the Credentials tab and select Prompt for credentials then type in a prompt (if you want)
You're now ready to roll! Close all those windows with Ok and then click on the Preview tab.
First, you'll be asked for a username and password and then you'll be asked for a database. The same happens if you run the deployed report from a web page.
If you have any other parameters for your report, you'll have these requested on the same window as the Database name (though, if you're a developer, there's every chance you'll be able to pass this parameter anyway).
The only drawback I can see from this is that you're using built in SQL Server accounts and not standard AD accounts.