I have a report with cascading parameters. The first parameter is Finanical Period Type, being either Month or Week. The second parameter is a list of either financial months or weeks depending on what was selected for the first parameter. This all works well and selecting a series of di开发者_开发百科fferent Financial Period Types in sequence correctly updates the second parameter's values.
However I now wish to add a default value for the second parameter, which is once again dependent on the first parameter. So I've added an additional field to the dataset populating the second parameter called DefaultPeriod and set the second parameter's default value to be retrieved from the above field.
The first time I select the Financial Period Type, the default is correctly set. However changing the Financial Period Type results in an updated list for the second parameter, but the default is incorrect. It remains set to the original default value, even thought the dataset has been refresh and the DefaultPeriod field is correct.
This is both an issue in the IDE and on the Report Manager site.
As JC mentioned, the default does not always get refreshed. But there is actually a workaround if you really really need the cascading parameters refreshed. The trick is to invalidate the selection of the cascading param each time the parent's value changes.
For more details, have a look at the following article by Boyan Penev: http://www.bp-msbi.com/2011/04/ssrs-cascading-parameters-refresh-solved/
Unfortunately the default gets determined only once, even if the underlying dataset changes. The only solution is to have a special option in every version of your second list. Assuming it's string parameter, I'd call it "Default" with a value of "-default-" and before using the value in a dataset, I'd check for the value of "-default-" and translate that into whatever is the appropriate default value based on the value of the first parameter.
I know it's convoluted, but it's the only way I've found to get around the problem.
精彩评论