Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Date Parameter Post Reply Post New Topic
Author Message
Sita
Newbie
Newbie


Joined: 19 Jan 2011
Location: United States
Online Status: Offline
Posts: 5
Quote Sita Replybullet Topic: Date Parameter
     Posted: 09 Mar 2011 at 7:10am
Hi,

I created two date parameters on my report:

StartDate
EndDate

I have another parameter for choosing file status (Open, Closed, All).

Based on the file status that users select, the date field pulls either Open files or Closed files within the selected date range. Is it possible for the report to pull both Open and Closed files when the file status is 'ALL'.

Can someone please help me with this. Thanks so much!
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 09 Mar 2011 at 7:24am

what is your current statement?

IP IP Logged
Sita
Newbie
Newbie


Joined: 19 Jan 2011
Location: United States
Online Status: Offline
Posts: 5
Quote Sita Replybullet Posted: 09 Mar 2011 at 7:28am
This is what I have on my report now. Current logic just pulls Open files when file status is 'ALL'.


(
({FileStatus} = 'Open' and {FileHdr.DateOpen} >={?__StartDt} and {FileHdr.DateOpen} <={?__EndDt})
or
({FileStatus} = 'Closed' and {FileHdr.DateClose} >={?__StartDt} and {FileHdr.DateClose} <={?__EndDt})
or
({FileStatus} = 'All' and ({FileHdr.DateOpen} >={?__StartDt} and {FileHdr.DateOpen} <={?__EndDt}) )
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 09 Mar 2011 at 7:33am

maybe


({FileStatus} = 'Open' and {FileHdr.DateOpen} in {?__StartDt} to {?__EndDt})
or
({FileStatus} = 'Closed' and {FileHdr.DateClose} in {?__StartDt} to {?__EndDt})
or
({FileStatus} = 'All' and
({FileHdr.DateOpen} in {?__StartDt} to {?__EndDt}
or
{FileHdr.DateClose} in {?__StartDt} to {?__EndDt}))
IP IP Logged
Sita
Newbie
Newbie


Joined: 19 Jan 2011
Location: United States
Online Status: Offline
Posts: 5
Quote Sita Replybullet Posted: 09 Mar 2011 at 7:54am
That worked. Thanks for your help DBlank
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