0
votes

I am trying to format the data field in this switch SSRS expression. the expression works fine before I put the date format

= Switch(ISNothing ( Fields!Contract_Completion_Date_Actual.Value ) AND ISNothing (Fields!Contract_Completion_Date_Projected.Value), "TBD" , ( Fields!Contract_Completion_Date_Actual.Value = "") and (Fields!Contract_Completion_Date_Projected.Value = "") , "TBD", ISNothing ( Fields!Contract_Completion_Date_Actual.Value) , Format (Fields!Contract_Completion_Date_Projected.Value, "dd-MMM-yy"), ISNothing (Fields!Contract_Completion_Date_Projected.Value),Format (Fields!Contract_Completion_Date_Actual.Value, "dd-MMM-yy"))

I am getting this when I try to run the report

enter image description here

1
That is odd, it works for me. Maybe try the FormatDateTime function instead. Also, do you have any formatting set on the textbox itself?StevenWhite

1 Answers

0
votes

Just format the textbox as dd-MMM-yy (right-click, "TextBox Properties", Number, Date...) and remove the Format statement from your Switch statement altogether. You'd only need to do the formatting in the switch if you wanted to use different formats for different values.