Highlight the field when error occurs

Xiaowen Dong 100 Reputation points
2023-03-31T05:29:39.89+00:00

I have an rdl report with a description field I want to emphasize the field when it contains "error". What am I supposed to do?

Thanks

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.
3,061 questions
0 comments No comments
{count} votes

Accepted answer
  1. Anonymous
    2023-03-31T06:21:22.3566667+00:00

    Hi @Xiaowen Dong

    If you say "error" in a fixed way, then you only need to use an expression like the following in the background color.

    =iif(Fields!Description.Value.ToString.Contains("Error"),"yellow",nothing)
    
    

    If you want "error" in the field to be case-insensitive, then you can use LCASE to convert the string to all lowercase first, and then look for "error", like this:

    =iif(LCASE(Fields!Description.Value).ToString.Contains("error"),"yellow",nothing)
    
    

    Preview:

    3

    Best regards,

    Aniya

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.