[英]SSRS 2008 - Empty Textbox if condition is true
I've got a report which includes a column called Capacity and want to return ""
if the result of the above textbox value is the same as the one in the current textbox. 我有一个报告,其中包含一个名为Capacity的列,并且如果上述文本框值的结果与当前文本框中的结果相同,则想返回
""
。
Example; 例;
Country Capacity Date
USA 100 01/01/2013
100 08/01/2013
100 15/01/2013
100 22/01/2013
So in this case I would want to show the first row with the Capacity of 100 and the rest just blank rows as the capacity is the same, is there a way to do this in SSRS 2008 as I don't want to alter the SQL? 因此,在这种情况下,由于容量相同,我想显示第一行的容量为100,其余的仅显示空白行,是否可以在SSRS 2008中执行此操作,因为我不想更改SQL ?
Thanks 谢谢
You can use the PREVIOUS
function (see doku ): 您可以使用
PREVIOUS
函数(请参阅doku ):
For the Textbox text use an expression to compare the current capacity value to the previous capacity value; 对于“文本框”文本,使用表达式将当前容量值与先前的容量值进行比较; if the values are the same display
""
. 如果值相同,则显示
""
。
=IIF(Previous(Fields!FieldName.Value) <> Fields!FieldName.Value,
Fields!FieldName.Value, "")
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.