SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2008 Forums
 Analysis Server and Reporting Services (2008)
 Building Expression
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

ilfoken
Starting Member

2 Posts

Posted - 03/28/2013 :  11:56:19  Show Profile  Reply with Quote
Hello, I am trying to write an Aging report. I have two bound fields (due date) and (Invoice Amount), two alias fields (31-60 days) and (>60 Days) and I would like to show the Invoice Amount value in the two alias fields if the due date is within the range based on today (or current) date. This is what I tried for the alias fields (31-60 days) but got empty values;
= iif(datediff("d",fields!duedate.Value,now())>=31 and datediff("d",fields!duedate.Value,now())<=60,fields!valuehome_1.Value,"")
Note: due date is equal to different dates (i.e. 02/15/2009, 04/23/2012 or 03/01/2013, etc.)
Can someone help me with the correct syntax for this requirement.
Thank you.

IK

visakh16
Very Important crosS Applying yaK Herder

India
52249 Posts

Posted - 03/28/2013 :  12:21:36  Show Profile  Reply with Quote
whats datatype of duedate field?

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

ilfoken
Starting Member

2 Posts

Posted - 03/28/2013 :  13:54:07  Show Profile  Reply with Quote
Datetime
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

India
52249 Posts

Posted - 03/29/2013 :  14:09:26  Show Profile  Reply with Quote
does duedate happen in future or in past? i hope its passed in which case what you've should work

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.05 seconds. Powered By: Snitz Forums 2000