Search code examples
reporting-servicesparametersreportviewerdynamic-dataparameter-passing

ReportViewer Web Control and Dynamic Connection Strings


So I have a report in Reporting Services 2005. In it is one parameter (ConnectionString) which determines which data source the report will use. It also has several other parameters which are dropdown lists derived from the data source chosen in the ConnectionString parameter.

In Report Manager, this works great. All of the dropdowns are greyed out at the beginning. When you choose your data source, the page requeries/repaints and all of the available parameter values for the other parameters are filled in based on the queries for those fields.

However ...

In the ReportViewer web control, when the report is first loaded up, instead of dropdown boxes all of the other parameter fields are just empty textboxes. Choosing a different data source for the ConnectionString parameter doesn't requery/repaint the other parameters.

I've been flipping through the ReportViewer programming reference to see if there's some way to replicate the Report Manager's way of reloading the webpage with the report viewer upon certain parameter changes, but I can't find anything there that isn't over my poor little .NET head.

Any ideas?


Solution

  • Not sure if this is any help but I do have a suggestion. I would try pulling the logic for dropdown boxes out of the report and put them in an ASP.net page. Then pass the parameters to the report and control the rendering/refreshing.

    HTH