简体   繁体   English

可见性表达式下的SSRS红色波浪线

[英]SSRS red squiggly line under visibility expression

I have a report where I want to hide certain elements based on a conditional expression. 我有一个报告,我想根据条件表达式隐藏某些元素。 However, I'm getting the red squiggly line under the field even though I think it exists. 但是,即使我认为它存在,我也会在田野下看到红色的波浪线。

在此处输入图片说明

In this case, I want to hide the element if the HasQuotasGlobal field does not contain a 1. This particular dataset always has exactly one row, so I'm using the aggregate First() function, which contains the reference to the dataset context. 在这种情况下,如果HasQuotasGlobal字段不包含1,则我想隐藏该元素。该特定数据集始终只具有一行,因此我使用的是聚合First()函数,该函数包含对数据集上下文的引用。

Can anyone tell me what is wrong with my expression? 谁能告诉我我的表情出了什么问题?

I can confirm that it is not working as expected. 我可以确认它没有按预期工作。 The report runs, however the expression always evaluates to false, meaning that the element is displayed even when it should not. 报告会运行,但是表达式始终求值为false,这意味着即使不显示该元素也将显示。

Don't worry about the squiggly line. 不用担心波浪线。 If there is a real Syntax Error the report will not be shown in preview, and you will get an error message instead. 如果存在真正的语法错误,则报告将不会显示在预览中,而是显示一条错误消息。 If you can see a preview, then the expression is valid. 如果您可以看到预览,则该表达式有效。

To debug this problem, add a Textbox with the value you are testing in it 要调试此问题,请添加一个文本框,其中包含您要测试的值

=First(Fields!HasQuotasGlobal.Value, "CountryData")

and another Textbox with the IIF too 还有另一个带有IIF的文本框

=IIF(First(Fields!HasQuotasGlobal.Value, "CountryData") = 1, True, False)

Then you will know how the expression is being evaluated. 然后,您将知道如何对表达式求值。

Remember that the visibility expression has TRUE = Hidden and FALSE = Visible. 请记住,可见性表达式具有TRUE =隐藏和FALSE =可见。

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

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