Print Page | Close Window

weekly report

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Technical Questions
Forum Discription: Formulas, charting data, Crystal syntax, etc.
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=117
Printed Date: 16 May 2024 at 5:18pm


Topic: weekly report
Posted By: p618
Subject: weekly report
Date 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.



Replies:
Posted By: BrianBischof
Date 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>


Posted By: WLWes
Date Posted: 12 Jan 2007 at 12:10pm
if {Orders.Order Date} in LastFullWeek and DayOfWeek ({Orders.Order Date})in [2 to 7] then true


Posted By: p618
Date 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


Posted By: BrianBischof
Date 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>



Print Page | Close Window