简体   繁体   English

SSRS 报告基于其他参数的参数设定值

[英]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.我想使用其他选定的参数数据集值设置我的参数的默认值 1。 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.然后在前一个参数中,用户选择name = alex,然后如何设置下一个参数值= 1,即前一个参数的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 .通常,您会将参数的available values属性指向您的数据集,并将参数值设置为ID并将参数标签设置为name This way the user chooses "Alex" from the list but internally the parameter value is actually 1这样用户从列表中选择“Alex”但在内部参数值实际上是1

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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