Dear all,
For a personnel report I wish to change the end date of a permanent contract into the retirement date (67 years). If the employee has a temporary contract, the end date should be according to the contract. Our system uses 31-12-2999 as a default value for the end date of permanent contracts.
I have formulated the following formula:
IIF(Fields!EndDateContract.Value=#31-12-2999#,DateAdd(DateInterval.Year,67,Fields!DateOfBirth.Value),Fields!EndDateContract.Value)
When I run the report I see the following error: The Value expression for the textrun ‘EndDateContract.Paragraphs[0].TextRuns[0]’ contains an error: [BC31085] Date constant is not valid
If I only enter DateAdd(DateInterval.Year,67,Fields!DateOfBirth.Value) the report works fine. Any ideas what the problem is? How can I solve this?
N.B. I work in SQL server 2008 R2. Report Builder 3.0
Many thanks in advance !
Regards, Rita