如果字段什么都没有,请禁用 "Go to report" 操作 - 不起作用?

If field is nothing, disable "Go to report" action - not working?

我的报告中有一个 "Detail" 按钮,只有当该行的开始和结束列中有数据时才会显示该按钮。

现在,我的详细信息文本框设置为:

一般 > 表达式:

=IIF(IsNothing(Fields!StartTime.Value) OR IsNothing(Fields!EndTime.Value), nothing, "Detail")

操作 > 转到报表 > 指定报表 > 表达式:

=IIF(IsNothing(Parameters!StartDate.Value) OR IsNothing(Parameters!EndDate.Value), Nothing, "Detail Report")

在通过浏览器的报表查看器中,运行 报表后,应应用 Nothing 的单元格会显示一个连字符 (-)。尽管有我的 "Specify a report" 代码,但出于某种原因可以单击此连字符。但是,在报告的 PDF 版本(或其他导出的)版本中,连字符不存在。我不在乎连字符在那里(我也不知道为什么在那里),但它不能被点击。

如果我 运行 Visual Studio 中的报告,我看不到连字符。当我将它上传到我们的报告服务器并从 chrome 访问它时。单击此连字符后,会出现错误 "The 'StartDate' parameter is missing a value."

我是不是做错了什么?

不要将 nothing 作为报告名称,而是将报告设置为 0。

因此将 goto 操作设置为:

=IIF(IsNothing(Parameters!StartDate.Value) OR IsNothing(Parameters!EndDate.Value), 0, "Asset Drilldown Report")

结果是我的一个错误。在我的 goto 操作中,我引用了 Parameters!StartDate.ValueParameters!EndDate.Value,而在我的 "Detail" 文本框表达式中,我引用了 Fields!StartTime.ValueFields!EndTime.Value。我把goto动作改成了后者,我的问题就解决了。