Вопрос

I need to change the color of my report.rdlc to Red when the fields!Date.Value = "Sunday" and the fields!start.Value > 22 and fields!finish.value < 5. I tried to use

=IIf(Hour(fields!start.Value) > 22,"Red","Black") 

but I don't know how I do the others cases. I am starting to report expressions now.

Это было полезно?

Решение

It should be very similar to any other logical expression. Just group all your conditions in parenthesis and if they are all true the action will happen so for your case try this...

=IIf(()Hour(fields!start.Value) > 22) AND 
    (Hour(fields!start.Value) < 5) AND 
    (fields!Date.Value = "Sunday")),"Red","Black") 
Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top