Bizarre behaviour with BackgroundRepeat property

  • In a simple tabular report I have small red and green images to indicate pass or fail KPI's for each row. The images are embedded and the BackgroundRepeat is set to 'clip'. The appropriate image is displayed according to a simple expression like so:

    IIF(Fields!Call_Type_Code.Value = "PM", Nothing, iif(Fields!Response_KPI.Value="Good","green","red")) - where green and red are the image names.

    On page 1 of the report all is fine. However on page 2 of the report the table cell seems to ignore the 'clip' value of the BackgroundRepeat property and show multiple images filling the available space. On page 3 it works correctly again!

    The most bizarre bit is that, in another coloumn, I also have the same images set by a slightly different expression:

    iif(Fields!Completion_KPI.Value="Good","green","red")

    and this one works correctly throughout the report.

    How can I prevent these spurious repeating images?

  • I think I've fixed this but the solution is as bizarre as the problem.

    The cause seems to be the nested IIF statement - though why I've no idea.

    The solution I've come up with is to repeat the nested IIF statement (that chooses the correct image to display) against the BackgroundRepeat property and set all conditions to 'Clip' so 'Clip' should be applied whatever the circumstances.

    Just testing this to make sure but if so I hope this will help others facing a similar issue.

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

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