Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Development Tools
 Reporting Services Development
 Field Expression Calculating Age Getting error

Author  Topic 

reddymade
Posting Yak Master

165 Posts

Posted - 2006-01-16 : 13:33:57
I am getting the following error:

c:\aspnet\ccsnetreports\rptStatSU.rdl The value expression for the field ‘=IIF(Fields!PDToContractorDate.Value Is Nothing, CDate(Fields!PDReceivedDate.Value).ToShortDateString & " (" & DateDiff("yyyy", CDate(Fields!PDReceivedDate.Value ), DateTime.Today) & ")",
CDate(Fields!PDReceivedDate.Value).ToShortDateString & " (" & DateDiff("yyyy", CDate(Fields!PDReceivedDate.Value), CDate(Fields!PDToContractorDate.Value) & ")")’ contains an error: [BC30198] ')' expected.

Here is the field expression can you please tell me which part am i doing wrong, this is my first time using an expression and it is confusing me:

=IIF(Fields!PDToContractorDate.Value Is Nothing, CDate(Fields!PDReceivedDate.Value).ToShortDateString & " (" & DateDiff("yyyy", CDate(Fields!PDReceivedDate.Value ), DateTime.Today) & ")",
CDate(Fields!PDReceivedDate.Value).ToShortDateString & " (" & DateDiff("yyyy", CDate(Fields!PDReceivedDate.Value), CDate(Fields!PDToContractorDate.Value) & ")")

Thank you very much for the information.

AndrewMurphy
Master Smack Fu Yak Hacker

2916 Posts

Posted - 2006-01-17 : 06:33:09
Posting the same error 3 times won't get it answered any faster....it is entirely possible that we have no experience here to help you.

triplicate....http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=60371
Go to Top of Page
   

- Advertisement -