如何从创建参数中汲取字段值

发布于 2025-01-21 01:29:35 字数 579 浏览 1 评论 0原文

我创建了一个参数 [GroupID],用于查询 SSRS 报告中的多个数据集。它使用我的 GroupList_Rolling12 数据集中的字段 [GroupID]。 [GroupID] 的示例是 77610N。选择 77610N 后,我的所有数据集都会针对此 [GroupID] 正确“过滤”。

我现在需要创建一个返回 [GroupID] 的 [GroupName] 的文本框。换句话说,当从我的 GroupID 参数中选择 77610N 时,我希望显示与所选 GroupID 参数关联的 [GroupName]。

我对 SSRS 还很陌生,无法弄清楚这一点。我尝试创建表达式 =First(Fields!GroupName.Value, "GroupList_Rolling12") 但这不起作用,因为它只是返回查询中的第一个值。

我也尝试过 =First(Parameters!GroupID.Value(0)) 但这也不起作用

我也尝试过这个表达式 =Lookup(Fields!GroupID.Value, Fields!GroupID.Value, Fields!GroupName.Value, "GroupList_Rolling12" ) )

你能帮忙吗?

I created a parameter [GroupID] that is used to query several datasets in my SSRS report. It is using the field [GroupID] from my GroupList_Rolling12 dataset. An example of [GroupID] is 77610N. When 77610N is selected, all of my datasets are correctly 'filtering' for this [GroupID].

I now need to create a text box that returns the [GroupName] of [GroupID]. In other words, when 77610N is selected from my GroupID parameter, I want the [GroupName] that is associated with the selected GroupID parameter to display.

I'm still very new to SSRS and cannot figure this out. I tried creating the expression =First(Fields!GroupName.Value, "GroupList_Rolling12") but that did not work since it simply returns the first value from the query.

I also tried =First(Parameters!GroupID.Value(0)) but this also did not work

I also tried this expression =Lookup(Fields!GroupID.Value, Fields!GroupID.Value, Fields!GroupName.Value, "GroupList_Rolling12")
)

Can you please help?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

国产ˉ祖宗 2025-01-28 01:29:35

参数标签

=Parameters!GroupID.Label

您可以直接引用类似的 将选择第一个选定的条目。

You can reference the parameter label directly like this

=Parameters!GroupID.Label

There is no need to put the index on the end (=Parameters!GroupID.Label(0)) unless your parameter is multi-value, in which case it would select the first selected entry.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文