Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2012

    Unanswered: Conditional Formatting Expression Help

    Hey all,

    I'm trying to put conditional formatting on a field, that behaves as follows:

    The data in the field is varchar, and sample data is either:
    3.0 :0
    11.7 :1 (these are ratios of a sort)

    I want to evaluate the first 3 characters of the string as numbers.

    Mid(fieldvalue,1,3) = "3.0" or "11."

    Any data that is greater than 1.99, I want to make the background dark red, anything else including nulls, zebra formatting. I have the following expression built so far and it appears to work, except when the value is null. If the value is null, it leaves the background color white. If you get a chance to take a look I appreciate any help. This is the warning: [rsRuntimeErrorInExpression] The BackgroundColor expression for the text box ‘Asthma’ contains an error: Input string was not in a correct format.

    ,(IIf(RowNumber(Nothing) Mod 2 = 0,"#b8cce4","#dbe5f1"))
    ,IIf(RowNumber(Nothing) Mod 2 = 0,"#b8cce4","#dbe5f1"))))

    My logic is, if the field is null, zebra format, if mid of the value is > 1.99, dark red, everything else zebra formatting. As I said, this seems to work except for nulls.

    Thanks for help!

  2. #2
    Join Date
    Jan 2007
    Provided Answers: 12
    Are we to assume you are playing with SSRS or another piece of reporting software?
    Home | Blog

  3. #3
    Join Date
    Mar 2012
    Sorry for being vague. It is SRSS

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts