Friday, March 9, 2012

Expression question

I don't know any other way to ask it than to post my code and ask what's wrong w/ it. It looks right to me, but I'm getting an error every time. Any and all suggestions are greatly appreciated!
This one returns a value of False:
=iif( Fields!Appearance.Value=4, Fields!Appearance.Value="Poor", iif( Fields!Appearance.Value=3,Fields!Appearance.Value="Fair", iif( Fields!Appearance.Value=2,Fields!Appearance.Value="Good", iif( Fields!Appearance.Value=1,Fields!Appearance.Value="Excellent", Fields!Appearance.Value="Unknown"))))
This one just errors out:
=Select Case Month(Fields!SubmitDate.Value)
case 1
Month(Fields!SubmitDate.Value)= "January"
case 2
Month(Fields!SubmitDate.Value)= "February"
case 3
Month(Fields!SubmitDate.Value)= "March"
case 4
Month(Fields!SubmitDate.Value)= "April"
case 5
Month(Fields!SubmitDate.Value)= "May"
case 6
Month(Fields!SubmitDate.Value)= "June"
case 7
Month(Fields!SubmitDate.Value)= "July"
case 8
Month(Fields!SubmitDate.Value)= "August"
case 9
Month(Fields!SubmitDate.Value)= "September"
case 10
Month(Fields!SubmitDate.Value)= "October"
case 11
Month(Fields!SubmitDate.Value)= "November"
case 12
Month(Fields!SubmitDate.Value)= "December"
case Else
Month(Fields!SubmitDate.Value)= "Unknown"
I've fixed the first expression...here's the new code:
=iif( Fields!Appearance.Value=4, "Poor", iif( Fields!Appearance.Value=3, "Fair", iif( Fields!Appearance.Value=2, "Good", iif( Fields!Appearance.Value=1, "Excellent","Unknown"))))
Still having trouble w/ the case statement though
|||

Instead of using a case statement try this:

=MonthName(DatePart("m",Fields!SubmitDate.Value))

No comments:

Post a Comment