在SSR中替换文本(基于参数)

发布于 2025-01-20 17:44:36 字数 306 浏览 3 评论 0原文

只是一个快速的问题,我对SSR有一个问题,我有2个参数,可以说'parameter_1'和'parameter_2'我需要在文本框(公司名称1和2)中更改文本(参数)(参数)是on,

= iif(parameters!filterParameter.value =“ parameter_1”然后“ company_name1”)

= iif(parameters!filterParameter.value =“ parameter_2”,然后“ company_name2”)

cant cant cant cant syntax,请辅助,请辅助

just a quick question, i have an issue with SSRS, i have 2 parameters, lets say 'parameter_1' and 'parameter_2' i need to change a text in text box (company name 1 and 2) if one of them (parameter) is on,

=IIf(Parameters!FilterParameter.Value="parameter_1" then "company_name1")

=IIf(Parameters!FilterParameter.Value="parameter_2" then "company_name2")

cant figure out with syntax, please assist

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

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

发布评论

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

评论(1

你げ笑在眉眼 2025-01-27 17:44:36

你的问题问的不是很清楚。您说您有 2 个参数,但听起来您有 1 个参数和 2 个可用值。

如果这是正确的,并且您只想根据选择的值返回不同的值,那么您可以做一些简单的事情

=SWITCH(
        Parameters!FilterParameter.Value="parameter_1", "Company_Name_1",
        Parameters!FilterParameter.Value="parameter_2", "Company_Name_2",
        True, "Unknown company"
        )

,例如,为什么不将参数标签设置为您想要的公司名称,那么您可以使用

=Parameters!FilterParameter.Label

如果我误解了那么请澄清你的问题。

You question is not very clear. You say you have 2 parameters, but it sounds like you have 1 parameter with 2 available values.

If that is correct and you simply want to return a different value depending on which is selected then you could do something simple like

=SWITCH(
        Parameters!FilterParameter.Value="parameter_1", "Company_Name_1",
        Parameters!FilterParameter.Value="parameter_2", "Company_Name_2",
        True, "Unknown company"
        )

alternatively, why not just set the parameter label to the company name you want, then you can just use

=Parameters!FilterParameter.Label

If I have misunderstood then please clarify your question.

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