开发者

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

开发者 https://www.devze.com 2023-04-10 23:00 出处:网络
I need to display data based on a condition. In that condition I need to check if a date is present ina datecolumn and display the data if yes and empty string i开发者_StackOverflowf no. Here\'s my ex

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

精彩评论

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

关注公众号