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

Posted on 2011-10-16
Last Modified: 2012-05-12
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.
Question by:John-S Pretorius
    LVL 100

    Accepted Solution


    {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


    Author Comment

    by:John-S Pretorius
    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.

    Author Closing Comment

    by:John-S Pretorius
    Thank You
    LVL 100

    Expert Comment

    I haven't heard of EasyView


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Enabling OSINT in Activity Based Intelligence

    Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

    Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
    There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
    To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
    This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor ( If you're looking for how to monitor bandwidth using netflow or packet s…

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now