简体   繁体   中英

SSRS Report set value of parameter based on other parameter

I want to set the default value of 1 of my parameter using the other selected parameters dataset value. for example, the content of the dataset is something like

[{'name': alex, 'id': 1},
{'name': bloom, 'id': 2},
{'name': kelly, 'id': 3},
{'name': david, 'id': 4},
{'name': lyn, 'id': 5}];

then in previous parameter, the user choose for name = alex, then how to set the next parameter value = 1, which the previous parameter's id.

转到要默认的参数属性> 转到默认值选项卡 > 指定值 > 添加 1 个值并使用以下表达式:

=Parameters!YourParameterName.Value

Is there any reason you need two parameters essentially pointing to the same thing?

Typically you would point you parameter's available values property to your dataset and set the parameter values to be ID and the parameter label to be name . This way the user chooses "Alex" from the list but internally the parameter value is actually 1

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM