Using Like with formatting

  • I have the word Subtotal four times and the word total once in my report (subtotals and grand totals), I want the total line to be bold so I tried the following code and nothing happened:

    =IIF(Fields!Indicator.Value like "total","Bold","Normal"), thinking along the lines of normal SQL coding, I also used =IIF(Fields!Indicator.Value like "%total%","Bold","Normal"), neither way seems to work, what am I doing wrong?

    I have added this to the Fontweight section.

  • You can't use like but you can use the InSTR function instead. Just like Patindex in SQL it returns an integer if a string is found in another string.

    Something like this should work:

    =IIF(InStr("total",Fields!DbName.Value)<> 0,Bold","Normal")

    [font="Verdana"]Markus Bohse[/font]

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply