How to write expression for bold a field based of two criteria's.

Anonymous
2023-03-07T20:28:10.5866667+00:00

I have a report that tells me what customers moved out of rental space and who move in after the move-out occurred.

What I am trying to do is come up with a way to bold the last names of someone who moved in 30 min after someone move out.

Also, need the last name fields bold if moved out the last name matches the move-in last name .

The expression i thought would work =IIF(Fields!MinBetween.Value<30,"Bold","Default") OR IIF(Fields!strMOLast.Value likeFields!strMILast.Value,"Bold","Default")

Not working. please help

User's image

SQL Server Reporting Services
SQL Server Reporting Services
A SQL Server technology that supports the creation, management, and delivery of both traditional, paper-oriented reports and interactive, web-based reports.
2,807 questions
{count} votes

1 answer

Sort by: Most helpful
  1. AniyaTang-MSFT 12,321 Reputation points Microsoft Vendor
    2023-03-08T01:35:50.07+00:00

    Hi @Jannette Jones

    If you want to implement multiple conditional writing expressions, you can use IIF function nesting. Another way to achieve the same functionality is to use the Switch function. The Switch function is useful if you want to test three or more conditions. For more details, you can refer to this link: Decision Functions.

    I use both of the following expressions to achieve the effect you want.

    =IIF(Fields!Min_Between.Value<30,"Bold", IIF(Fields!Move_out.Value=Fields!Move_in.Value,"Bold","Default"))
    
    =switch(Fields!Min_Between.Value<30,"Bold", Fields!Move_out.Value=Fields!Move_in.Value,"Bold")
    
    

    1

    If the answer is helpful, please click "Accept Answer" and upvote it. If you have any questions, please feel free to let me know.

    Best regards,

    Aniya

    0 comments No comments