In general, you can assign a string value to the Value property of a PictureBox. This string value can be either an item binding expression or an URI. Check PictureBox Data Binding section of the help article.
From the provided report definition snippet, I noticed that there is no "=" sign in front of the IIF logical function
. By default the report items’ properties are strongly typed. Anyway you can use expressions as value for some of them, like for example PictureBox item. To specify that the value of a property is an expression, the value should be a string starting with equal (=) sign. If the equal sign is not present the value will be interpreted as a string literal.
Another things to consider are true/false parts of the IIF statement and used relative paths to the images. Based on the logic required for displaying the PictureBox item you described, using the following expression should be sufficient:
"=IIf(Fields.StartTime.Hour > 12, \"images\\sun-o.png\" , \"images\\moon-o-png\")"
You also can use a user function that resolves the relative path to an absolute path in PictureBox.Value property.
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Telerik Feedback Portal
and vote to affect the priority of the items