Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: weekly report Post Reply Post New Topic
Author Message
p618
Newbie
Newbie
Avatar

Joined: 12 Jan 2007
Location: United Kingdom
Online Status: Offline
Posts: 2
Quote p618 Replybullet Topic: weekly report
    Posted: 12 Jan 2007 at 8:14am
Hi,
 
I am looking to schedule a weekly report on a sunday which covers the previous Tuesday to Saturday.  The paramater evaluation for last week is:

else if {?Relative Date} = "Last Week" then

(

RecStartDate := LastWeek(StartOfWeek)[1] + Y2KDate ;

RecEndDate := LastWeek(StartOfWeek)[2] + Y2KDate;

)
 
I saw the Last7Days Predefined Date Range Constant but I would like the last  6 days.
 
Any pointers would be apreciated.
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 12 Jan 2007 at 8:58am
I thought there might be a way to tweak the Last7Days constant, but I'm not having any luck there. I would just modify your RecStartDate to be

RecStartDate := LastWeek(StartOfWeek)[1] + Y2KDate + 1;

that way it only uses six days instead of seven.
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>
IP IP Logged
WLWes
Newbie
Newbie


Joined: 12 Jan 2007
Online Status: Offline
Posts: 6
Quote WLWes Replybullet Posted: 12 Jan 2007 at 12:10pm
if {Orders.Order Date} in LastFullWeek and DayOfWeek ({Orders.Order Date})in [2 to 7] then true
IP IP Logged
p618
Newbie
Newbie
Avatar

Joined: 12 Jan 2007
Location: United Kingdom
Online Status: Offline
Posts: 2
Quote p618 Replybullet Posted: 15 Jan 2007 at 5:03am
Thanks guys, I went with the RecStartDate := LastWeek(StartOfWeek)[1] + Y2KDate + 1; solution but added RecEndDate := LastWeek(StartOfWeek)[1] + Y2KDate - 1; to get Tues to Sat.
 
I posted this query on aspect admins; code guru; business objects but this is the only forum where I got a reply, thanks again
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 15 Jan 2007 at 9:04am
That's great. I'm glad you got the help you needed.

Hey - you should go on the other forums and let people know where you got your question answered! I could use the extra help in spreading the word about the forums. 
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>
IP IP Logged
Post Reply Post New Topic
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



This page was generated in 0.014 seconds.