2015-02-06 77 views
0

请参阅PIC enter image description hereSSRS IIF不工作

出于某种原因,我的表达是不工作多表达,我想不通为什么...

我想要做的是,如果检查UseByDate它的空白设置时间为空,并且如果选择日期时间为空白(时间字段),如果不是空白,也设置为空白使用pickdatetime。然而,我的表情似乎没有正常工作,出于某种原因?

=IIF(Fields!UseByDate.Value is nothing, nothing, IIF(Fields!PickedDateTime is nothing, nothing, FORMAT(System.TimeZone.CurrentTimeZone.ToLocalTime(Fields!PickedDateTime.Value), "HH:mm"))) 

我已检查了pickdatetime值,并且该行绝对为空。

enter image description here

+0

是否使用由它的属性单元格中的时间格式选项用?解决这个问题的方法是,您可以根据您的值设置单元格的可见性。 – 2015-02-06 14:37:09

+0

我检查了格式属性,并且HH:mm被设置了,但是我删除了这个并且它没有修复它......我不希望整个列不可见,只是值。 – jhowe 2015-02-06 15:32:24

回答

1

更换Fields!PickedDateTimeFields!PickedDateTime.Value

+0

感谢您发现错误!不是我第一次这样做... – jhowe 2015-02-10 17:19:59

1

我想表达的书写方式不检查没有正确。尝试:

=IIF(IsNothing(Fields!UseByDate.Value)=True, nothing, IIF(IsNothing(Fields!PickedDateTime)=True, nothing, FORMAT(System.TimeZone.CurrentTimeZone.ToLocalTime(Fields!PickedDateTime.Value), "HH:mm")))