We are building dynamic reports with various parameters. There is one parameter (X) where each value basically defines what type of parameter should be used next. I figured that the most obvious moment to add or modify parameters is on the NeedDataSource since there aren't that many other hooks. I tried to trick this by writing a class which is called by an ObjectDataSource and only modifies the Report by calling a function that add parameters. This ObjectDataSource is bound to a hidden ReporParameter and has a DataSourceParameter that uses the selection from the first parameter. So once I select a value the method is called that manipulates the ReportParameters (adding, removing, hiding). Unfortunately, any parameter I manipulate or add once the Report is constructed isn't displayed.
The Refresh button on the WebForms ReportViewer however makes later added parameters visible. Is there any way I can trigger the same functionality of the Refresh button programatically?
Right now I have to resort to moving parameters in a custom section on the webpage to get this done. Which I rather not do because it simply looks more inconsistent.
The Refresh button on the WebForms ReportViewer however makes later added parameters visible. Is there any way I can trigger the same functionality of the Refresh button programatically?
Right now I have to resort to moving parameters in a custom section on the webpage to get this done. Which I rather not do because it simply looks more inconsistent.