Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Date Range Post Reply Post New Topic
Author Message
SATELE01
Newbie
Newbie
Avatar

Joined: 13 Aug 2012
Location: United States
Online Status: Offline
Posts: 24
Quote SATELE01 Replybullet Topic: Date Range
     Posted: 19 Nov 2012 at 11:23am
I have a parameter Date field that I want to show exists within another range of dates
 

{?As of Date} in {Employee_job_History_SCD.DateEffective} to {Employee_job_History_SCD.DateExpires}
 
THE PARAMETER As f Dat is a Date parameter
the  Employee_job_History_SCD.DateEffective is (date, not null)
the Employee_job_History_SCD.DateExpires is (date, null)
 
I keep getting error  on {Employee_job_History_SCD.DateEffective} to {Employee_job_History_SCD.DateExpires} in the following formula
 
{?As of Date} in {Employee_job_History_SCD.DateEffective} to {Employee_job_History_SCD.DateExpires}
 
Error "A date range is required here"
 
Would appreciate any help
 
Thanks
 
 
 
IP IP Logged
Sastry
Moderator
Moderator
Avatar

Joined: 16 Jul 2012
Online Status: Offline
Posts: 537
Quote Sastry Replybullet Posted: 19 Nov 2012 at 7:37pm
Hi
 
Thre are two things  to check :
 
1.  Edit your parameter and see if the type is date or not
 
2. If your date field is only date or date time ?  If your date filed is date time then use the following :
 
{?As of Date} in date({Employee_job_History_SCD.DateEffective}) to
date({Employee_job_History_SCD.DateExpires})
Thanks,
Sastry
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 20 Nov 2012 at 4:09am
you might also try
{?As of Date} in {Employee_job_History_SCD.DateEffective} to (if is null({Employee_job_History_SCD.DateExpires}) then currentdate else {Employee_job_History_SCD.DateExpires}
)
IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum