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
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.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.