ReportViewer Web Control and Dynamic Connection Strings

So, I have a report in Reporting Services 2005. It has one parameter (ConnectionString) that determines which data source the report will use. It also has a couple of other options, which are dropdowns obtained from the datasource selected in the ConnectionString option.

In Report Manager, this works great. All drop-down lists are first highlighted in gray. When you select a data source, the requeries / repaints pages and any available parameter values ​​for other parameters are populated based on the requests for those fields.

But...

In the ReportViewer web control, when the report is first loaded, instead of drop-down lists, all other parameter fields are just empty text boxes. Choosing a different data source for the ConnectionString parameter does not require / redraws other parameters.

I have been looking at the ReportViewer Programming link to see if there is a way to replicate the Report Manager way to reload a web page using the report viewer on certain parameter changes, but I cannot find anything in there, above my poor little .NET head.

Any ideas?

0


a source to share


2 answers


Not sure if this is any help, but I have a suggestion. I tried to pull the logic for the dropdowns from the report and put them in an ASP.net page. Then pass the parameters to the report and do the render / update control.



NTN

+2


a source


UPDATE: Thus, you must provide a default value for any parameters, which in turn affect other parameters in your report, in order to get the dropdown box to load correctly on initialization. Also note that this is recursive - so if you have a parameter that affects another parameter that affects another parameter, both the first and second parameters should have default values.



0


a source







All Articles