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

Joined: 06 Apr 2009
Location: United States
Online Status: Offline
Posts: 1
Quote wearbest Replybullet Topic: Date Parameter Field
     Posted: 06 Apr 2009 at 12:11pm
Hi,
The report I created promts the user to choose a date parameter field range before the report is run. How can i use the parameter to show me the dates from exactly a year ago. Let's say user chooses 2009-03-01 and I want the report to show 2008-03-01.
{vwSalesOrders.OrderDate} = {?Year}
Can someone help me on this?
 
Thanks
MB 
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 06 Apr 2009 at 1:14pm
Do you want records that only = exactly the one day of the paramter -1 year or do you want all dates in that year range?
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 06 Apr 2009 at 1:31pm
1 day only set you select statement to:
{vwSalesOrders.OrderDate} = dateadd("yyyy",-1,{?Year})
for the entire year span:
{vwSalesOrders.OrderDate} in dateadd("yyyy",-1,{?Year}) to {?Year}
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