views:

326

answers:

2

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 different 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.

A: 

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.

JC
A: 

Hi JC, It would be really great if you could pls elaborate the mentioned workaround a bit more.

Did you mean, in the dataset for second parameter, we should always have a value say '-default value-' and hardcode this in the default value for second parameter. And then in the dataset for report evaluate this accordingly.

Pls confirm.

Thanks, Munish Bansal Tech Updates

Munish