开发者

Checking for a date if present in a datatime column in SSRS

I need to display data based on a condition. In that condition I need to check if a date is present in a datecolumn and display the data if yes and empty string i开发者_StackOverflowf no. Here's my expression

    IIF(Day(Fields!datet2.Value) <> First(Fields!PourSchedDay.Value, "PatientOrderPourDetails"),"",Fields!StaffName.Value)

The expression just checks for the first row in the PourSchedDay column and displays the data correctly where the date is equal to the first row and display empty string for all the other days.

How do I get the the expression to check for all the dates in the column?

Please help!!


If you can check your condition in your sql query, your problem will solve.


I have got the solution by using a lookup function inside the IIF condition. Below is my expression

=IIF(Lookup(Fields!datet7.Value, Fields!PourSchedDay.Value, Fields!StaffName.Value, "PatientOrder")= Fields!StaffName.Value,Fields!StaffName.Value, "")

Thanks!!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜