why is that extra comma at the end of your expression (marked in red below)
CODE.CheckSignificantDate(DateDiff(DateInterval.Day,Parameters!ToDate.Value,Parameters!FromDate.Value,))
You are calling the code for all values, so better check the date differentce in the expression itself (using IIf function) and then call the code.
Shyam