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
 Adding a new field expression with iif condition

Author  Topic 

reddymade
Posting Yak Master

165 Posts

Posted - 2006-01-16 : 11:13:22
I added a new field for calculating AGE: with an iif condition.

=Iif(isdate(fields!ContractorDate) = 1,DATEDIFF(Day, fields!ReceivedDate, fields!ContractorDate),DATEDIFF(Day, fields!ReceivedDate, GETDATE()))

I am getting the following error: when i run the reports complaining about the day as integer how should i declare:


c:\aspnet\rptStatSU.rdl The value expression for the field ‘=Iif(isdate(fields!ContractorDate) = 1,DATEDIFF(Day, fields!ReceivedDate, fields!ContractorDate),DATEDIFF(Day, fields!ReceivedDate, GETDATE()))’ contains an error: [BC30455] Argument not specified for parameter 'DateValue' of 'Public Function Day(DateValue As Date) As Integer'.

Please help, and thank you very much for the information.

AndrewMurphy
Master Smack Fu Yak Hacker

2916 Posts

Posted - 2006-01-16 : 12:00:31
duplicate....http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=60371
Go to Top of Page
   

- Advertisement -