• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 795
  • Last Modified:

Need a Crystal formula that will pull data from previous week monday to sunday

Trying to formulate a Crystal Report that I intend to run on a Monday morning and pull the previous monday to the Sunday :

If tomorows date is : 10/17/2001, I want to pull data regardless if it flows from one month to another from previous week : Monday 10/10/2011 to Sunday 10/16/2011

No grouping is being done.
0
John-S Pretorius
Asked:
John-S Pretorius
  • 2
  • 2
1 Solution
 
mlmccCommented:
Try

{YourDateField} In PreviousWeek

If that doesn't work

{YourDateField} >= CurrentDate - 7 AND {YourDateField} < CurrentDate

If it is a DateTime field

Date({YourDateField}) >= CurrentDate - 7 AND  Date({YourDateField}) < CurrentDate

mlmcc
0
 
John-S PretoriusTechnical Service Manager, Mid-AtlanticAuthor Commented:
mlmcc, thank you for your responce - I'm pretty sure yours will work even better but this is what I ended up getting to work :

{EntriesExits.Time} in [(Minimum(lastfullweek)+1)
to (Maximum(lastfullweek)+1)]

I'm using Easyview Crystal batching to send the report and have to innitiate it between 11:55 and midnight on Sunday to get it for the full previous week - luckily no transactions occur after 9pm.

Are you familiar with Easyview ? I'm having an issue when running a report with Subreports in it, if so I would like to post a question about this soon.

Thanks again.
0
 
John-S PretoriusTechnical Service Manager, Mid-AtlanticAuthor Commented:
Thank You
0
 
mlmccCommented:
I haven't heard of EasyView

mlmcc
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now