I'm running into another problem now. The nested iff seems to work. My current code looks like this:
=iif(Fields!CurrentPlan.Value - Fields!OriginalPlan.Value = TimeSpan.FromDays(0), "G", iif(Fields!CurrentPlan.Value - Fields! OriginalPlan.Value < TimeSpan.FromDays(14), "M", "S")) I'm trying to see if the current plan is not exceeding the original plan too much. I'm doing this by creating a new TimeSpan that's supposed to be the number of days. However, the part "TimeSpan.FromDays(0)" is underlined in red, so it's not valid somehow. Looks like it only allows a few very basic VB commands. When previewing it i get: [rsRuntimeErrorInExpression] The Value expression for the textbox ‘textbox17’ contains an error: Specified cast is not valid. Preview complete -- 0 errors, 1 warnings Anybody here with experience with this? On 18 feb, 17:00, Robin <[email protected]> wrote: > Thanks, sounds like a possible solution. > I'll let it know once i make some progress! > > On 18 feb, 16:08, sallushan <[email protected]> wrote: > > > > > Sorry for double posts, that was due to our brilliant ISP :) > > > On Feb 18, 8:07 pm, sallushan <[email protected]> wrote: > > > > How about creating a nested "iif" > > > > e.g, > > > IIF( v = 1, "Red", IIF( v = 2, "Green", "Blue")) > > > > On Feb 18, 5:36 pm, Robin <[email protected]> wrote: > > > > > Hey, > > > > > I'm currently creating a report for Microsoft Project Server in Visual > > > > Studio. > > > > Everything is going great so far, but i'm currently stuck at dynamic > > > > styles. > > > > > I would like a certain cell to have a color based on the value. > > > > I know this is possible with 2 different values, like this: > > > > > =iif(Fields!Profit.Value < 0, "Red", "Black") > > > > (http://msdn.microsoft.com/en-us/library/ms252080.aspx) > > > > > But what if i would also like an Orange for the value 1? I was > > > > thinking of something like a switch or elseif, but that's not working > > > > (im not very experienced in VB!) > > > > > Thanks!- Hide quoted text - > > > > - Show quoted text -- Tekst uit oorspronkelijk bericht niet weergeven - > > > - Tekst uit oorspronkelijk bericht weergeven -- Tekst uit oorspronkelijk > > bericht niet weergeven - > > - Tekst uit oorspronkelijk bericht weergeven -
